mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-23 15:26:47 +00:00
Merge "Follow-up Ie0a938249: Add comment explaining why resize event is needed"
This commit is contained in:
commit
1c3ee74a7a
|
@ -68,6 +68,8 @@ function toggleDocClassAndSave( featureName, value, config, userPreferences ) {
|
|||
document.documentElement.classList.remove( `${ featureName }-clientpref-${ possibleValue }` );
|
||||
} );
|
||||
document.documentElement.classList.add( `${ featureName }-clientpref-${ value }` );
|
||||
// Client preferences often change the layout of the page significantly, so emit
|
||||
// a window resize event for other apps that need to update (T374092).
|
||||
window.dispatchEvent( new Event( 'resize' ) );
|
||||
// Ideally this should be taken care of via a single core helper function.
|
||||
mw.util.debounce( () => {
|
||||
|
|
Loading…
Reference in a new issue