mirror of
https://github.com/StarCitizenTools/mediawiki-extensions-TabberNeue.git
synced 2024-11-23 16:06:45 +00:00
fix: only resize section when it is the active panel
This commit is contained in:
parent
819b55a93d
commit
54166529cb
|
@ -119,8 +119,12 @@ function initTabber( tabber, count ) {
|
|||
const onElementResize = function ( entries ) {
|
||||
if ( entries && entries.length > 0 ) {
|
||||
const targetPanel = entries[ 0 ].target;
|
||||
const section = targetPanel.parentNode;
|
||||
updateSectionHeight( section, targetPanel );
|
||||
|
||||
/* Only update section height when it is the current active tab */
|
||||
if ( targetPanel.getAttribute( 'aria-hidden' ) === false ) {
|
||||
const section = targetPanel.parentNode;
|
||||
updateSectionHeight( section, targetPanel );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue