Merge pull request #1765 from ONLYOFFICE/fix/bugfix

Fix Bug 57321
This commit is contained in:
Julia Radzhabova 2022-05-27 12:31:39 +03:00 committed by GitHub
commit f0481bbd77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,8 +147,13 @@ define([
el.on('input', '.form-control', _.bind(this.onInput, this));
if (!this.options.allowDecimal)
el.on('keypress', '.form-control', _.bind(this.onKeyPress, this));
el.on('focus', 'input.form-control', function() {
setTimeout(function(){me.$input && me.$input.select();}, 1);
el.on('focus', 'input.form-control', function(e) {
setTimeout(function(){
if (me.$input) {
me.$input[0].selectionStart = 0;
me.$input[0].selectionEnd = me.$input.val().length;
}
}, 1);
});
Common.Utils.isGecko && el.on('blur', 'input.form-control', function() {
setTimeout(function(){