We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent debfe01 commit 5772975Copy full SHA for 5772975
2 files changed
.changeset/large-pens-hang.md
@@ -0,0 +1,5 @@
1
+---
2
+"bits-ui": patch
3
4
+
5
+fix(MenuSubTriggerState): handle open delay correctly
packages/bits-ui/src/lib/bits/menu/menu.svelte.ts
@@ -1402,14 +1402,22 @@ export class MenuSubTriggerState {
1402
!this.submenu.opts.open.current &&
1403
!this.#openTimer
1404
) {
1405
+ const openDelay = this.opts.openDelay.current;
1406
1407
+ if (openDelay <= 0) {
1408
+ this.submenu.onOpen();
1409
+ return;
1410
+ }
1411
1412
this.#openTimer = this.content.domContext.setTimeout(() => {
1413
if (this.submenu.root.isPointerInTransit) {
1414
this.#clearOpenTimer();
1415
return;
1416
}
1417
1418
this.submenu.onOpen();
1419
- }, this.opts.openDelay.current);
1420
+ }, openDelay);
1421
1422
1423
0 commit comments