fix: stricter selector to prevent issues with nested Tabber

This commit is contained in:
alistair3149 2021-06-23 10:29:42 -04:00
parent 5e398c9129
commit 342cc2aa85
No known key found for this signature in database
GPG key ID: 94D081060FD3DD9C

View file

@ -5,7 +5,7 @@
*/
function initTabber( tabber ) {
const key = tabber.getAttribute( 'id' ).substring( 7 ),
tabPanels = tabber.querySelectorAll( '.tabber__panel' );
tabPanels = tabber.querySelectorAll( ':scope > .tabber__section > .tabber__panel' );
const container = document.createElement( 'header' ),
tabList = document.createElement( 'nav' ),