From 93284137970d2ac1bda29f9a8feb6da9c69e3db8 Mon Sep 17 00:00:00 2001 From: johnnyjoygh Date: Mon, 27 Jul 2026 22:05:20 +0800 Subject: [PATCH] fix(ui): keep select menus above parent popovers --- web/src/components/ui/select.tsx | 1 + web/tests/select.test.tsx | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 web/tests/select.test.tsx diff --git a/web/src/components/ui/select.tsx b/web/src/components/ui/select.tsx index 6f728a22..41b04f71 100644 --- a/web/src/components/ui/select.tsx +++ b/web/src/components/ui/select.tsx @@ -71,6 +71,7 @@ function SelectContent({ alignOffset={alignOffset} side={side} sideOffset={sideOffset} + className="isolate z-dropdown" > { + it("places the positioner in the dropdown stacking layer", () => { + const items = [ + { value: "create_time", label: "Created" }, + { value: "update_time", label: "Last updated" }, + ]; + render( + , + ); + + fireEvent.click(screen.getByRole("combobox", { name: "Shown time" })); + + const popup = document.querySelector('[data-slot="select-content"]'); + expect(popup).not.toBeNull(); + expect(popup?.parentElement).toHaveClass("isolate", "z-dropdown"); + }); +});