fix(webui): preserve search results and dialog scrolling with landscape keyboards

This commit is contained in:
Xubin Ren committed 2026-10-04 20:14:21 +08:00
1 parent 2442d88b91
commit ce89f7caf7
6 files changed
+99 -10

No files matched your search

+12
View File
@@ -24,6 +24,18 @@ import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea";
describe("UI shape system", () => {
it.each(["center", "bottom"] as const)("keeps an oversized %s dialog scrollable from its start", (placement) => {
render(<Dialog open><DialogContent placement={placement}>
<DialogTitle>Long dialog</DialogTitle>
<DialogDescription>Content that can outgrow a keyboard-fitted frame.</DialogDescription>
</DialogContent></Dialog>);
const dialog = screen.getByRole("dialog");
expect(dialog.parentElement).toHaveClass("items-start", "overflow-y-auto");
// The scroll owner stays inside Radix's overlay/scroll-lock boundary.
expect(dialog.parentElement?.parentElement).toHaveClass("backdrop-blur-[8px]", "duration-200");
expect(dialog).toHaveClass(placement === "bottom" ? "mt-auto" : "my-auto");
});
it("uses pill-shaped inputs and the shared radius for other controls", () => {
render(
<>