Open JorensM opened 6 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
svelte-headlessui-kf6d | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Mar 31, 2024 9:04am |
Is there any reason why it has stopPropogation in the first place? Anyway, this workaround is greatly appreciated and would solve #162
Is there any reason why it has stopPropogation in the first place? Anyway, this workaround is greatly appreciated and would solve #162
Not sure why it's there honestly, but I guess better to leave it in case it is actually needed for some reason.
I have created a new fork for us to share so we can fix these issues: https://github.com/PyongyangOpenSource/svelte-headlessui
This PR fixes an issue where clicking on an
<a/>
element that is inside a<Dialog/>
caused a full page reload due to the fact that<Dialog/>
had a click handler that callede.stopPropogation()
.<a/>
elements have a native Svelte event handler attached to them, which was being ignored due toe.stopPropogation()
. This PR conditionally appliese.stopPropogation()
unless the clicked element is not an<a/>
element.