diff --git a/src/mixins/canvas_events.mixin.js b/src/mixins/canvas_events.mixin.js index 0dbb920fb3f..91a2b62cada 100644 --- a/src/mixins/canvas_events.mixin.js +++ b/src/mixins/canvas_events.mixin.js @@ -152,14 +152,6 @@ _target && target.fire('mouseout', { e: e }); }); this._hoveredTargets = []; - - if (this._iTextInstances) { - this._iTextInstances.forEach(function(obj) { - if (obj.isEditing) { - obj.hiddenTextarea.focus(); - } - }); - } }, /** diff --git a/src/mixins/itext_behavior.mixin.js b/src/mixins/itext_behavior.mixin.js index 4d075b4f4a4..caf591610c1 100644 --- a/src/mixins/itext_behavior.mixin.js +++ b/src/mixins/itext_behavior.mixin.js @@ -386,6 +386,9 @@ return; } + // regain focus + document.activeElement !== this.hiddenTextarea && this.hiddenTextarea.focus(); + var newSelectionStart = this.getSelectionStartFromPointer(options.e), currentStart = this.selectionStart, currentEnd = this.selectionEnd;