mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-11 16:59:09 +00:00
Emit a window resize event when client preferences are changed
Bug: T374092 Change-Id: Ie0a9382498c682ac8c1f7942cc3590e9789a1e80
This commit is contained in:
parent
b3300f6f19
commit
f653d50f12
|
@ -68,6 +68,7 @@ function toggleDocClassAndSave( featureName, value, config, userPreferences ) {
|
|||
document.documentElement.classList.remove( `${ featureName }-clientpref-${ possibleValue }` );
|
||||
} );
|
||||
document.documentElement.classList.add( `${ featureName }-clientpref-${ value }` );
|
||||
window.dispatchEvent( new Event( 'resize' ) );
|
||||
// Ideally this should be taken care of via a single core helper function.
|
||||
mw.util.debounce( () => {
|
||||
userPreferences = userPreferences || new mw.Api();
|
||||
|
|
Loading…
Reference in a new issue