mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-27 17:10:19 +00:00
collapsibleTabs: Debounce resize event at 100ms instead of 500ms
A delay of 500ms is quite long and is a bad user experience. Resize should be more responsive than that. Matches other plugins that do the same thing, such as: http://www.paulirish.com/2009/throttled-smartresize-jquery-event-handler/ And also more in accordance with RAIL. https://developers.google.com/web/tools/chrome-devtools/profile/evaluate-performance/rail Change-Id: I076785f82a7786f16ca4fb1564a4972dd23cc56b
This commit is contained in:
parent
cfcdefc297
commit
020956d070
|
@ -26,7 +26,7 @@
|
|||
|
||||
// if we haven't already bound our resize handler, bind it now
|
||||
if ( !$.collapsibleTabs.boundEvent ) {
|
||||
$( window ).on( 'resize', $.debounce( 500, function () {
|
||||
$( window ).on( 'resize', $.debounce( 100, function () {
|
||||
$.collapsibleTabs.handleResize();
|
||||
} ) );
|
||||
$.collapsibleTabs.boundEvent = true;
|
||||
|
|
Loading…
Reference in a new issue