Merge pull request #673 from ONLYOFFICE/fix/bugfix

Fix Bug 46575
This commit is contained in:
Julia Radzhabova 2021-01-25 16:46:25 +03:00 committed by GitHub
commit 6d32b8860b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,7 +78,7 @@ Common.UI.FocusManager = new(function() {
var field = fields[i];
if ((field.cmp.isVisible ? field.cmp.isVisible() : field.cmp.is(':visible')) && !(field.cmp.isDisabled && field.cmp.isDisabled())) {
var el = (field.selector) ? (field.cmp.$el || $(field.cmp.el || field.cmp)).find(field.selector).addBack().filter(field.selector) : field.el;
el.focus();
el && setTimeout(function(){ el.focus(); }, 10);
break;
}
}
@ -93,7 +93,7 @@ Common.UI.FocusManager = new(function() {
var field = fields[i];
if ((field.cmp.isVisible ? field.cmp.isVisible() : field.cmp.is(':visible')) && !(field.cmp.isDisabled && field.cmp.isDisabled())) {
var el = (field.selector) ? (field.cmp.$el || $(field.cmp.el || field.cmp)).find(field.selector).addBack().filter(field.selector) : field.el;
el.focus();
el && setTimeout(function(){ el.focus(); }, 10);
break;
}
}