forked from XiaoMo/ChatGPT-Next-Web
fix: scroll ux on ios device
This commit is contained in:
parent
701a6e413f
commit
a2baad9c7f
@ -317,6 +317,12 @@
|
|||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 600px) {
|
||||||
|
.chat-input {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.chat-input:focus {
|
.chat-input:focus {
|
||||||
border: 1px solid var(--primary);
|
border: 1px solid var(--primary);
|
||||||
}
|
}
|
||||||
|
@ -177,10 +177,14 @@ export function Chat(props: { showSideBar?: () => void }) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
latestMessageRef.current?.scrollIntoView({
|
const dom = latestMessageRef.current;
|
||||||
behavior: "smooth",
|
const rect = dom?.getBoundingClientRect();
|
||||||
block: "end",
|
if (dom && rect && rect?.top >= document.documentElement.clientHeight - 120) {
|
||||||
});
|
dom.scrollIntoView({
|
||||||
|
behavior: "smooth",
|
||||||
|
block: "end"
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -322,7 +326,7 @@ export function Home() {
|
|||||||
const loading = !useChatStore?.persist?.hasHydrated();
|
const loading = !useChatStore?.persist?.hasHydrated();
|
||||||
const [showSideBar, setShowSideBar] = useState(true);
|
const [showSideBar, setShowSideBar] = useState(true);
|
||||||
|
|
||||||
// settings
|
// setting
|
||||||
const [openSettings, setOpenSettings] = useState(false);
|
const [openSettings, setOpenSettings] = useState(false);
|
||||||
const config = useChatStore((state) => state.config);
|
const config = useChatStore((state) => state.config);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user