Change events used with the Ace editor

Use an Ace-builtin "change" event on the editor so that it also triggers
for search&replace. Also, use "change" instead of "keyup" on the
textarea, just to be sure not to miss anything.

Bug: T203391
Change-Id: Ib246c30a575d140642c74e8ac08b24bdeaaf0347
This commit is contained in:
Daimona Eaytoy 2018-09-03 16:03:24 +02:00
parent 48989ffcda
commit 063bdf0a4b

View file

@ -411,7 +411,7 @@
switchEditor();
// Hide the syntax ok message when the text changes and sync dummy box
$filterBox.keyup( function () {
filterEditor.on( 'change', function () {
var $el = $( '#mw-abusefilter-syntaxresult' );
if ( $el.data( 'syntaxOk' ) ) {
@ -426,7 +426,7 @@
}
// Hide the syntax ok message when the text changes
$plainTextBox.keyup( function () {
$plainTextBox.change( function () {
var $el = $( '#mw-abusefilter-syntaxresult' );
if ( $el.data( 'syntaxOk' ) ) {