mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-28 00:01:05 +00:00
fix(core): 🐛 emit resize event after clientPref change
Various apps listen to window resize events to reposition absolutely positioned elements
This commit is contained in:
parent
50c30afa23
commit
c37560a2a9
|
@ -83,6 +83,9 @@ function toggleDocClassAndSave( featureName, value, config ) {
|
||||||
const pref = config[ featureName ];
|
const pref = config[ featureName ];
|
||||||
const callback = pref.callback || ( () => {} );
|
const callback = pref.callback || ( () => {} );
|
||||||
clientPrefs.set( featureName, value );
|
clientPrefs.set( featureName, 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' ) );
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue