Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte committed Sep 20, 2024
1 parent eedb1c6 commit 2e044df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/bits-ui/src/lib/bits/menu/menu.svelte.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { box } from "svelte-toolbelt";
import { tick, untrack } from "svelte";
import { IsFocusWithin } from "runed";
import type { InteractOutsideEvent } from "../utilities/dismissable-layer/types.js"
import type { InteractOutsideEvent } from "../utilities/dismissable-layer/types.js";
import {
FIRST_LAST_KEYS,
type GraceIntent,
Expand Down Expand Up @@ -353,15 +353,15 @@ class MenuContentState {

handleInteractOutside = (e: InteractOutsideEvent) => {
if (!isElementOrSVGElement(e.target)) return;
const triggerId = this.parentMenu.triggerNode?.id
const triggerId = this.parentMenu.triggerNode?.id;
if (e.target.id === triggerId) {
e.preventDefault();
return;
}
if (e.target.closest(`#${triggerId}`)) {
e.preventDefault();
}
}
};

props = $derived.by(
() =>
Expand Down

0 comments on commit 2e044df

Please sign in to comment.