From 1dbdf2ac75a8516a670c6b0469805c9835229f55 Mon Sep 17 00:00:00 2001 From: Hunter Johnston Date: Mon, 14 Aug 2023 10:22:20 -0400 Subject: [PATCH 1/4] bug example --- .../hover-card/components/HoverCard.svelte | 4 +- .../menubar/components/MenubarMenu.svelte | 2 +- src/lib/primitives/menubar/ctx.ts | 2 +- src/routes/+page.svelte | 70 ++++++++++++++++++- svelte.config.js | 4 +- 5 files changed, 76 insertions(+), 6 deletions(-) diff --git a/src/lib/primitives/hover-card/components/HoverCard.svelte b/src/lib/primitives/hover-card/components/HoverCard.svelte index 3d1b6eda9..1db320dc4 100644 --- a/src/lib/primitives/hover-card/components/HoverCard.svelte +++ b/src/lib/primitives/hover-card/components/HoverCard.svelte @@ -6,8 +6,8 @@ export let positioning: $$Props["positioning"] = undefined; export let open: $$Props["open"] = undefined; export let onOpenChange: $$Props["onOpenChange"] = undefined; - export let openDelay: $$Props["openDelay"] = undefined; - export let closeDelay: $$Props["closeDelay"] = undefined; + export let openDelay: $$Props["openDelay"] = 700; + export let closeDelay: $$Props["closeDelay"] = 300; export let closeOnOutsideClick: $$Props["closeOnOutsideClick"] = undefined; export let closeOnEscape: $$Props["closeOnEscape"] = undefined; export let arrowSize: $$Props["arrowSize"] = undefined; diff --git a/src/lib/primitives/menubar/components/MenubarMenu.svelte b/src/lib/primitives/menubar/components/MenubarMenu.svelte index 9c7b632ae..541a95315 100644 --- a/src/lib/primitives/menubar/components/MenubarMenu.svelte +++ b/src/lib/primitives/menubar/components/MenubarMenu.svelte @@ -28,8 +28,8 @@ loop, dir, onOpenChange: ({ next }) => { - open = next; onOpenChange?.(next); + open = next; return next; } }); diff --git a/src/lib/primitives/menubar/ctx.ts b/src/lib/primitives/menubar/ctx.ts index 9408fff7f..972c375ba 100644 --- a/src/lib/primitives/menubar/ctx.ts +++ b/src/lib/primitives/menubar/ctx.ts @@ -63,7 +63,7 @@ function setMenu(props: CreateMenubarMenuProps) { builders: { createMenu } } = get(); - const menu = createMenu({ ...removeUndefined(props), forceVisible: false }); + const menu = createMenu(removeUndefined(props)); setContext(MENU_NAME, menu); return { ...menu, diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index cea72fbc1..d0658729e 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,5 +1,6 @@