From 2fc44e9d1863f9f44e28b32a923a3a0b15d761f4 Mon Sep 17 00:00:00 2001 From: Daimona Eaytoy Date: Wed, 22 Aug 2018 10:57:15 +0200 Subject: [PATCH] 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 --- modules/ext.abuseFilter.edit.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ext.abuseFilter.edit.js b/modules/ext.abuseFilter.edit.js index b02dc3a97..e343e8b28 100644 --- a/modules/ext.abuseFilter.edit.js +++ b/modules/ext.abuseFilter.edit.js @@ -162,6 +162,7 @@ if ( useAce ) { filterEditor.insert( $filterBuilder.val() + ' ' ); $plainTextBox.val( filterEditor.getSession().getValue() ); + filterEditor.focus(); } else { $plainTextBox.textSelection( 'encapsulateSelection', { pre: $filterBuilder.val() + ' ' }