-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
onclick seems to not be working on web components #14704
Comments
From what I know, |
@Ocean-OS Apple pay does use Shadow DOM |
This is a combination of several things:
|
…opagation issue - don't delegate events on custom elements - still invoke listener for cancelled event on the element where it was cancelled: when you do `stopPropagation`, `event.cancelBubble` becomes `true`. We can't use this as an indicator to not invoke a listener directly, because the listner could be on the element where propagation was cancelled, i.e. it should still run for that listener. Instead, adjust the event propagation algorithm to detect when a delegated event listener caused the event to be cancelled fixes #14704
Describe the bug
Using
onclick
on a web-component (ApplePay button, on this case) is not working. The handler function is not being called. If I change to Svelte's 4on:click
the handler function is called normallyAs far as I understand the
apple-pay-button
web-component fires a click eventReproduction
https://github.com/GCastilho/svelte-5-onclick-bug-reproduction
(Note the usage of 'vite-plugin-mkcert' to use https on localhost. HTTPS is required for the ApplePay button to be displayed)
Logs
No response
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: