mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-09-23 18:29:49 +00:00
collapsibleTabs: Stop the tabs from collapsing back and forth forever
Update the 'expandedWidth' after we expand in case someone was brazen enough to change the tab's contents after the page load (gasp). This doesn't prevent a tab from collapsing back and forth once, but at least it won't continue to do that forever. This should reduce the issue from completely awful to mildly annoying. Bug: T71729 Change-Id: I46bd6584c0f2ddebc4aa7d1103cff1715e1510a5
This commit is contained in:
parent
490a72b92b
commit
532b9c0eaf
|
@ -172,8 +172,15 @@
|
|||
.data( 'collapsibleTabsSettings', data )
|
||||
.animate( { width: expandedWidth + 'px' }, 'normal', function () {
|
||||
$( this ).attr( 'style', 'display: block;' );
|
||||
expContainerSettings.shifting = false;
|
||||
rAF( $.collapsibleTabs.handleResize );
|
||||
rAF( function () {
|
||||
// Update the 'expandedWidth' in case someone was brazen enough to change the tab's
|
||||
// contents after the page load *gasp* (T71729). This doesn't prevent a tab from
|
||||
// collapsing back and forth once, but at least it won't continue to do that forever.
|
||||
data.expandedWidth = $moving.width();
|
||||
$moving.data( 'collapsibleTabsSettings', data );
|
||||
expContainerSettings.shifting = false;
|
||||
$.collapsibleTabs.handleResize();
|
||||
} );
|
||||
} )
|
||||
);
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue