-
Hey, I've migrated my application to bits-ui v1.1.0, alongside a new version of Svelte and Vite. I'm using a DropdownMenu with multiple submenus right next to each other. I've followed the migration guide and got the Menu to work again for the most part. However, I now observe a weird behavior with the submenus. It seems to be possible to open two submenus simultaneously by hovering the mouse slowly over another of the neighboring triggers: Here's a MRE I crafted: <script lang="ts">
import { DropdownMenu } from 'bits-ui';
</script>
<DropdownMenu.Root>
<DropdownMenu.Trigger class="rounded-lg bg-gray-300 w-20">Trigger</DropdownMenu.Trigger>
<DropdownMenu.Portal>
<DropdownMenu.Content sideOffset={8}>
<DropdownMenu.Item class="h-10 bg-gray-100 data-[highlighted]:bg-gray-300">
Item
</DropdownMenu.Item>
<DropdownMenu.Sub>
<DropdownMenu.SubTrigger
class="h-10 bg-gray-100 data-[highlighted]:bg-red-500 data-[state=open]:bg-green-500"
>
SubTrigger A
</DropdownMenu.SubTrigger>
<DropdownMenu.SubContent
class="border border-solid border-yellow-400 bg-gray-300"
sideOffset={8}
>
SubContent A<br />
SubContent A<br />
SubContent A<br />
SubContent A<br />
</DropdownMenu.SubContent>
</DropdownMenu.Sub>
<DropdownMenu.Sub>
<DropdownMenu.SubTrigger
class="h-10 bg-gray-100 data-[highlighted]:bg-red-500 data-[state=open]:bg-green-500"
>
SubTrigger B
</DropdownMenu.SubTrigger>
<DropdownMenu.SubContent
class="border border-solid border-yellow-400 bg-gray-200"
sideOffset={8}
>
SubContent B<br />
SubContent B<br />
SubContent B<br />
SubContent B<br />
</DropdownMenu.SubContent>
</DropdownMenu.Sub>
</DropdownMenu.Content>
</DropdownMenu.Portal>
</DropdownMenu.Root> I also replicated this on Stackblitz: Am I missing something here, or is this a bug in the new version? I've been debugging this for quite a while now, but to not much avail. I'll greatly appreciate any help at this point. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
FYI: this seems to have been addressed in #1275 |
Beta Was this translation helpful? Give feedback.
FYI: this seems to have been addressed in #1275