Fix scroll up when clicking on the bottom of long textareas
[MAILPOET-1728]
This commit is contained in:
@@ -62,22 +62,14 @@ define([
|
|||||||
});
|
});
|
||||||
|
|
||||||
editor.on('click', function onClick(e) {
|
editor.on('click', function onClick(e) {
|
||||||
editor.focus();
|
// if caret not in editor, place it there (triggers focus on editor)
|
||||||
if (that._isActivationClick) {
|
if (document.activeElement !== editor.targetElm) {
|
||||||
editor.selection.setRng(
|
editor.selection.placeCaretAt(e.clientX, e.clientY);
|
||||||
window.tinymce.dom.RangeUtils.getCaretRangeFromPoint(
|
|
||||||
e.clientX,
|
|
||||||
e.clientY,
|
|
||||||
editor.getDoc()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
that._isActivationClick = false;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
editor.on('focus', function onFocus() {
|
editor.on('focus', function onFocus() {
|
||||||
that.view.triggerMethod('text:editor:focus');
|
that.view.triggerMethod('text:editor:focus');
|
||||||
that._isActivationClick = true;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
editor.on('blur', function onBlur() {
|
editor.on('blur', function onBlur() {
|
||||||
|
Reference in New Issue
Block a user