Skip to content

Commit 1b92821

Browse files
authored
adding a check in pfe-tab-panel to see if associated tab is selected when panel is initialized (#432)
* removing Promise.all since we're not using slotchange event Fixes #431 * adding the promises back in but leaving the previousElementSibling check in pfe-tab-panel Fixes #431 * added pfe-navigation tests by accident
1 parent ae21a66 commit 1b92821

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

elements/pfe-tabs/src/pfe-tabs.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,9 @@ class PfeTabPanel extends PFElement {
605605
this.setAttribute("tabindex", 0);
606606
}
607607

608-
this.hidden = true;
608+
if (this.previousElementSibling.getAttribute("aria-selected") !== "true") {
609+
this.hidden = true;
610+
}
609611

610612
if (window.ShadyCSS) {
611613
this._observer.observe(this, { childList: true });

0 commit comments

Comments
 (0)