fix context menu keyboard focus

This commit is contained in:
Thomas Camlong committed 2026-08-03 13:24:13 +02:00
1 parent 294217fcba
commit 6e15f8bcf8
2 files changed
+2 -2

No files matched your search

@@ -182,6 +182,7 @@ export const BoardEmptySpaceContextMenu = ({ section, refs, children, ...boxProp
</Box>
<Menu
opened={menu !== null}
withInitialFocusPlaceholder={false}
onChange={(opened) => {
if (!opened) closeMenu();
}}
@@ -194,6 +195,7 @@ export const BoardEmptySpaceContextMenu = ({ section, refs, children, ...boxProp
</Menu.Target>
<Menu.Dropdown>
<Menu.Item
data-autofocus
leftSection={<IconPlus size={18} />}
onClick={() => {
const placement = menu?.placement;
-2
View File
@@ -255,8 +255,6 @@ describe("Board advanced interactions", () => {
await expect(grid).toHaveAttribute("aria-label", "Add item here");
await grid.press("Shift+F10");
await expect(addHereMenuItem).toBeVisible();
await page.keyboard.press("ArrowDown");
await expect(addHereMenuItem).toBeFocused();
await page.keyboard.press("Enter");
await expect(page.getByRole("dialog").filter({ hasText: "Choose item to add" })).toBeVisible();