rgossiaux / svelte-headlessui

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

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

Open rogerso opened 3 weeks ago

rogerso commented 3 weeks 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 3 weeks 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