forked from XiaoMo/ChatGPT-Next-Web
fix: mobile textarea autofocus ui error
This commit is contained in:
parent
18d8eb4767
commit
71f119c9e8
@ -170,7 +170,7 @@ export function PromptHints(props: {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Chat(props: { showSideBar?: () => void }) {
|
export function Chat(props: { showSideBar?: () => void, sideBarShowing?: boolean }) {
|
||||||
type RenderMessage = Message & { preview?: boolean };
|
type RenderMessage = Message & { preview?: boolean };
|
||||||
|
|
||||||
const chatStore = useChatStore();
|
const chatStore = useChatStore();
|
||||||
@ -444,7 +444,7 @@ export function Chat(props: { showSideBar?: () => void }) {
|
|||||||
setAutoScroll(false);
|
setAutoScroll(false);
|
||||||
setTimeout(() => setPromptHints([]), 100);
|
setTimeout(() => setPromptHints([]), 100);
|
||||||
}}
|
}}
|
||||||
autoFocus
|
autoFocus={!props?.sideBarShowing}
|
||||||
/>
|
/>
|
||||||
<IconButton
|
<IconButton
|
||||||
icon={<SendWhiteIcon />}
|
icon={<SendWhiteIcon />}
|
||||||
@ -646,7 +646,7 @@ export function Home() {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<Chat key="chat" showSideBar={() => setShowSideBar(true)} />
|
<Chat key="chat" showSideBar={() => setShowSideBar(true)} sideBarShowing={showSideBar} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user