Skip to content

Commit

Permalink
fix(sifrr-dom): bubble only bubblable events
Browse files Browse the repository at this point in the history
  • Loading branch information
aadityataparia committed Jan 21, 2020
1 parent a91784f commit 8fdf844
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/browser/sifrr-dom/src/dom/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ export const getEventListener = (name: string): EventListener => {
}
while (dom) {
cssMatchEvent(e, name, dom, target);
dom = <HTMLElement>dom.parentNode || <HTMLElement>(<ShadowRoot>(<unknown>dom)).host;
if (e.bubbles) {
dom = <HTMLElement>dom.parentNode || <HTMLElement>(<ShadowRoot>(<unknown>dom)).host;
} else {
dom = null;
}
}
};
};
Expand Down

0 comments on commit 8fdf844

Please sign in to comment.