Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shadow DOM breaks Router transitions #4

Open
R2Boyo25 opened this issue Oct 15, 2023 · 0 comments
Open

Shadow DOM breaks Router transitions #4

R2Boyo25 opened this issue Oct 15, 2023 · 0 comments

Comments

@R2Boyo25
Copy link

R2Boyo25 commented Oct 15, 2023

When using a shadow DOM (such as with web components), the router ignores click events from a tags within shadow DOMs. (I believe it is due to this line.)
This is due to event retargeting.
I have encountered this issue with Material Web Components HREF buttons.

From what I have read, you can get the original element (in the shadow dom) from Event.composedPath(), as long as the shadow DOM was created in open mode. (the MWC buttons are.)

This leads to the entire app reloading when you click a link within a shadow DOM, instead of the router changing pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant