mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-14 19:26:42 +00:00
Trigger window.resize when toggeling pinnableElement
The width of the screen changes when the pinnableElement is pinned or un-pinned. Other features may need to react to this, like for example the RevisionSlider extension. Triggering a window.resize is a generic way to make sure these changes can be handled by other elements on the page. Bug: T336729 Depends-On: Iba22924b660f2709c0680aa6fbeb0feba92cfa76 Change-Id: I49878fdd8794273919bf961648fd93fdcf9511af
This commit is contained in:
parent
ce5c5dba93
commit
7e63cdb219
|
@ -112,6 +112,7 @@ function pinnableElementClickHandler( header ) {
|
|||
setSavedPinnableState( header );
|
||||
const newContainerId = isPinnedElement ? pinnedContainerId : unpinnedContainerId;
|
||||
movePinnableElement( pinnableElementId, newContainerId );
|
||||
window.dispatchEvent( new Event( 'resize' ) );
|
||||
setFocusAfterToggle( pinnableElementId );
|
||||
if ( !isPinnedElement ) {
|
||||
addPinnableElementIndicator( pinnableElementId );
|
||||
|
|
Loading…
Reference in a new issue