jenkins-bot has submitted this change and it was merged.

Change subject: Fix warning about useless setTimeout call in Firefox
......................................................................


Fix warning about useless setTimeout call in Firefox

One call to delay was missing function() wrapping and
thus executing the function immediately. This also fixes
the missing delay for other browsers.

Bug: 46605
Change-Id: Ia8d25a768c889a1207025e017790c9efa66151eb
---
M resources/js/ext.translate.messagetable.js
1 file changed, 7 insertions(+), 4 deletions(-)

Approvals:
  Amire80: Looks good to me, but someone else must approve
  Siebrand: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/js/ext.translate.messagetable.js 
b/resources/js/ext.translate.messagetable.js
index 143e59b..6dc919f 100644
--- a/resources/js/ext.translate.messagetable.js
+++ b/resources/js/ext.translate.messagetable.js
@@ -71,7 +71,8 @@
                },
 
                listen: function () {
-                       var messageTable = this;
+                       var messageTable = this,
+                               $filterInput = this.$container.parent().find( 
'.tux-message-filter-box' );
 
                        $( window ).scroll(function () {
                                delay( function () {
@@ -83,12 +84,14 @@
                                $( '.tux-action-bar' ).width( $( 
'.tux-messagelist' ).width() );
                        } );
 
-                       $( '.tux-message-filter-box' ).on( 'input 
propertychange', function () {
-                               delay( messageTable.search( $( this ).val() ), 
300 );
+                       $filterInput.on( 'input propertychange', function () {
+                               delay( function () {
+                                       messageTable.search( $filterInput.val() 
);
+                               }, 300 );
                        } );
 
                        $( '.tux-message-filter-box-clear' ).on( 'click', 
function () {
-                               $( '.tux-message-filter-box' ).focus().val( '' 
).trigger( 'input' );
+                               $filterInput.focus().val( '' ).trigger( 'input' 
);
                        } );
 
                        this.$container.on( 'clear', $.proxy( 
messageTable.clear, messageTable ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/58295
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia8d25a768c889a1207025e017790c9efa66151eb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
Gerrit-Reviewer: Amire80 <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Santhosh <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to