Merge pull request #1861 from ONLYOFFICE/fix/bugfix

Fix prev. rev. (Bug 58177)
This commit is contained in:
Julia Radzhabova 2022-07-19 19:46:09 +03:00 committed by GitHub
commit db55d9bdec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -358,7 +358,7 @@ define([
Common.NotificationCenter.trigger('menu:hide', this, isFromInputControl); Common.NotificationCenter.trigger('menu:hide', this, isFromInputControl);
if (this.options.takeFocusOnClose) { if (this.options.takeFocusOnClose) {
var me = this; var me = this;
(me._input && !me.editable) && (me._input[0].selectionStart===me._input[0].selectionEnd) && setTimeout(function() { (me._input && me._input.length>0 && !me.editable) && (me._input[0].selectionStart===me._input[0].selectionEnd) && setTimeout(function() {
me._input[0].selectionStart = me._input[0].selectionEnd = 0; me._input[0].selectionStart = me._input[0].selectionEnd = 0;
},1); },1);
setTimeout(function(){me.focus();}, 1); setTimeout(function(){me.focus();}, 1);