Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/201840
Change subject: Debounce resize events ...................................................................... Debounce resize events Not debouncing is dumb. Bug: T93988 Change-Id: Ic991d3cdd22f5cb58cb99a6e64d4e568bedcc517 (cherry picked from commit 20fbcf1302c8ce8fcca06132ec7bb686a830d347) --- M includes/Resources.php M javascripts/application.js 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/40/201840/1 diff --git a/includes/Resources.php b/includes/Resources.php index 792e2ba..c105d62 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -313,6 +313,7 @@ 'mobile.user', 'mediawiki.api', 'mobile.redlinks', + 'jquery.throttle-debounce', ), 'templates' => array( 'icon.hogan' => 'templates/icon.hogan', diff --git a/javascripts/application.js b/javascripts/application.js index 45fedef..1e71a8b 100644 --- a/javascripts/application.js +++ b/javascripts/application.js @@ -21,8 +21,7 @@ } ); M.define( 'skin', skin ); - $( window ).on( 'resize', $.proxy( M, 'emit', 'resize' ) ) - .on( 'scroll', $.proxy( M, 'emit', 'scroll' ) ); + $( window ).on( 'resize', $.debounce( 100, $.proxy( M, 'emit', 'resize' ) ) ); /** * Get current page view object -- To view, visit https://gerrit.wikimedia.org/r/201840 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic991d3cdd22f5cb58cb99a6e64d4e568bedcc517 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: wmf/1.25wmf23 Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits