Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
fix(ui): keep select menus above parent popovers
johnnyjoygh93284137970d
diff --git a/web/src/components/ui/select.tsx b/web/src/components/ui/select.tsxindex 6f728a227..41b04f71d 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"><SelectPrimitive.Popupdata-slot="select-content"diff --git a/web/tests/select.test.tsx b/web/tests/select.test.tsxnew file mode 100644index 000000000..ab991beb7--- /dev/null+++ b/web/tests/select.test.tsx@@ -0,0 +1,32 @@+import { fireEvent, render, screen } from "@testing-library/react";+import { describe, expect, it } from "vitest";+import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";++describe("Select", () => {+ it("places the positioner in the dropdown stacking layer", () => {+ const items = [+ { value: "create_time", label: "Created" },+ { value: "update_time", label: "Last updated" },+ ];+ render(+ <Select defaultValue="update_time" items={items}>+ <SelectTrigger aria-label="Shown time">+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {items.map((item) => (+ <SelectItem key={item.value} value={item.value}>+ {item.label}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>,+ );++ 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");+ });+});