Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Chat: the chosen tab scrolls into view on a phone

Adarsh98d17e24ade2
diff --git a/src/components/chat/chat-home.tsx b/src/components/chat/chat-home.tsx
index ebb722f2..dfe2118f 100644
--- a/src/components/chat/chat-home.tsx
+++ b/src/components/chat/chat-home.tsx
@@ -61,6 +61,11 @@ export function ChatHome() {
const [making, setMaking] = useState(() => sp.get("make") === "1");
const mature = !!me.data?.mature;
+ // On a phone the tabs scroll sideways: the chosen one always shows (also when a link opens on a later tab).
+ useEffect(() => {
+ document.querySelector('[aria-label="Kind of chat"] [aria-selected="true"]')?.scrollIntoView({ block: "nearest", inline: "nearest" });
+ }, [kind, making]);
+
const gate = () => {
if (guest) {
askToSignUp("run");