Skip to content

Commit

Permalink
fix: set global input font size to avoid iPhone auto zoom in
Browse files Browse the repository at this point in the history
  • Loading branch information
vaayne committed Aug 24, 2024
1 parent ef3f88b commit 762b147
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
14 changes: 12 additions & 2 deletions web/src/components/layout.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AppShell, createTheme, MantineProvider } from "@mantine/core";
import { AppShell, createTheme, Input, MantineProvider } from "@mantine/core";
import "@mantine/core/styles.css";
import { ModalsProvider } from "@mantine/modals";
import { Notifications } from "@mantine/notifications";
Expand All @@ -10,7 +10,17 @@ import { queryClient } from "../libs/api";
import useStore from "../libs/store";
import Header from "./header";

const theme = createTheme({});
const theme = createTheme({
components: {
Input: Input.extend({
styles: {
input: {
fontSize: "16px",
},
},
}),
},
});

export default function Layout({ main, nav = null, header = null }) {
let haveNav = nav !== null;
Expand Down
1 change: 0 additions & 1 deletion web/src/components/thread-input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ export function ThreadChatInput() {
maxRows={5}
autosize
w="100%"
styles={{ input: { fontSize: "16px" } }} // Prevent auto-zoom on iPhone
disabled={sendMessage.isPending}
onKeyDown={async (e) => {
// Shift + Enter to send
Expand Down

0 comments on commit 762b147

Please sign in to comment.