From ea7a738c5e663bfa8a043f406b3e7705267ec973 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 22 Jul 2021 23:39:06 +0300 Subject: [PATCH] [DE] Select form placeholder on focus --- apps/documenteditor/main/app/view/FormSettings.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/documenteditor/main/app/view/FormSettings.js b/apps/documenteditor/main/app/view/FormSettings.js index 72fdc4f9f9..fdbabcb023 100644 --- a/apps/documenteditor/main/app/view/FormSettings.js +++ b/apps/documenteditor/main/app/view/FormSettings.js @@ -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'),