Fix scroll up when clicking on the bottom of long textareas

[MAILPOET-1728]
This commit is contained in:
Jan Jakeš
2019-02-11 12:54:09 +01:00
committed by M. Shull
parent b0681c0be9
commit cb3b0e7f1e

View File

@@ -62,22 +62,14 @@ define([
});
editor.on('click', function onClick(e) {
editor.focus();
if (that._isActivationClick) {
editor.selection.setRng(
window.tinymce.dom.RangeUtils.getCaretRangeFromPoint(
e.clientX,
e.clientY,
editor.getDoc()
)
);
that._isActivationClick = false;
// if caret not in editor, place it there (triggers focus on editor)
if (document.activeElement !== editor.targetElm) {
editor.selection.placeCaretAt(e.clientX, e.clientY);
}
});
editor.on('focus', function onFocus() {
that.view.triggerMethod('text:editor:focus');
that._isActivationClick = true;
});
editor.on('blur', function onBlur() {