Focus the Ace editor after having added text from dropdown

The classic editor (textarea) already takes focus, while for Ace we need
to explicitly call its focus() method.

Bug: T202480
Change-Id: I8dcf54e46e730b2879b09b4e21198b2ef1131706
This commit is contained in:
Daimona Eaytoy 2018-08-22 10:57:15 +02:00
parent 47acf13b4d
commit 2fc44e9d18

View file

@ -162,6 +162,7 @@
if ( useAce ) {
filterEditor.insert( $filterBuilder.val() + ' ' );
$plainTextBox.val( filterEditor.getSession().getValue() );
filterEditor.focus();
} else {
$plainTextBox.textSelection(
'encapsulateSelection', { pre: $filterBuilder.val() + ' ' }