Skip to content

Commit 6db8a0c

Browse files
authored
fix: Issue 816 pfe tabs stop propagation (#819)
* fix: removing stopPropagation from pfe-tabs click and keydown events Fixes #816 * updating the changelog * should be currentTarget instead of event.target event.target broke pfe-content-set. Using event.currenTarget is the right way to look for the selected tab. * using event.currentTarget instead of foundTab
1 parent eb64d81 commit 6db8a0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,13 +432,13 @@ class PfeTabs extends PFElement {
432432

433433
_onClick(event) {
434434
const tabs = this._allTabs();
435-
const foundTab = tabs.find(tab => tab === event.target);
435+
const foundTab = tabs.find(tab => tab === event.currentTarget);
436436

437437
if (!foundTab) {
438438
return;
439439
}
440440

441-
this.selectedIndex = this._getTabIndex(foundTab);
441+
this.selectedIndex = this._getTabIndex(event.currentTarget);
442442
}
443443

444444
_getTabIndexFromURL() {

0 commit comments

Comments
 (0)