You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 4 on:click the handler function is called normally
As far as I understand the apple-pay-button web-component fires a click event
From what I know, onclick uses event delegation in Svelte, while on:click is effectively the same as addEventListener. I don't know enough about the Apple Pay web components to know if they have a Shadow DOM, because that influences how events work as well. I'm not sure if/how event delegation works with custom elements either.
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: