Merge pull request #1010 from ONLYOFFICE/fix/bugfix

[DE] Select form placeholder on focus
This commit is contained in:
Julia Radzhabova 2021-07-22 23:51:42 +03:00 committed by GitHub
commit e023a32569
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -137,6 +137,9 @@ define([
this.lockedControls.push(this.txtPlaceholder);
this.txtPlaceholder.on('changed:after', this.onPlaceholderChanged.bind(this));
this.txtPlaceholder.on('inputleave', function(){ me.fireEvent('editcomplete', me);});
this.txtPlaceholder.cmpEl.on('focus', 'input.form-control', function() {
setTimeout(function(){me.txtPlaceholder._input && me.txtPlaceholder._input.select();}, 1);
});
this.textareaHelp = new Common.UI.TextareaField({
el : $markup.findById('#form-txt-help'),