rgossiaux / svelte-headlessui

Unofficial Svelte port of the Headless UI component library
https://svelte-headlessui.goss.io
MIT License
1.79k stars 97 forks source link

Fix: Tab key processed more than once in nested <Popover/>s #181

Open rogerso opened 2 months ago

rogerso commented 2 months ago

This PR fixes the issue where handleWindowKeydown() is called more than once in nested <Popover>, as each <PopoverPanel> has its own <svelte:window> with an on:keydown handler. The added event.stopImmediatePropagation() makes sure only one handler is called for the same keydown event.

This fixes #180.

vercel[bot] commented 2 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 Sep 11, 2024 0:14am