fix(webui): prevent iOS Safari composer zoom

This commit is contained in:
chengyongru
2026-06-24 10:26:14 +08:00
committed by Xubin Ren
parent 6d989de336
commit b14f82f408
2 changed files with 4 additions and 2 deletions
@@ -1566,10 +1566,10 @@ export function ThreadComposer({
"w-full resize-none bg-transparent",
isHero
? cn(
"min-h-[78px] px-4 text-[15px] leading-6 sm:px-5",
"min-h-[78px] px-4 text-[16px] leading-6 sm:px-5",
relaxedHeroInput ? "pb-2 pt-[27px]" : "pb-1.5 pt-4",
)
: "min-h-[50px] px-3.5 pb-1.5 pt-3 text-[13.5px] leading-5 sm:px-4",
: "min-h-[50px] px-3.5 pb-1.5 pt-3 text-[16px] leading-5 sm:px-4",
);
return (
+2
View File
@@ -281,6 +281,7 @@ describe("ThreadComposer", () => {
const input = screen.getByPlaceholderText("Ask anything...");
expect(input).toBeInTheDocument();
expect(input.className).toContain("min-h-[78px]");
expect(input.className).toContain("text-[16px]");
expect(input.className).toContain("pt-[27px]");
fireEvent.change(input, { target: { value: "1" } });
expect(input.className).toContain("pt-[27px]");
@@ -302,6 +303,7 @@ describe("ThreadComposer", () => {
expect(screen.getByTestId("composer-model-logo-openai")).toBeInTheDocument();
const input = screen.getByPlaceholderText("Type your message...");
expect(input.className).toContain("min-h-[50px]");
expect(input.className).toContain("text-[16px]");
expect(input.parentElement?.parentElement?.className).toContain("max-w-[49.5rem]");
expect(input.parentElement?.parentElement?.className).toContain("rounded-[22px]");
expect(input.parentElement?.parentElement?.className).toContain("shadow-[0_12px_30px_rgba(15,23,42,0.07)]");