mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
fix(Settings.jsx): fix Settings inputs losing focus to main textarea (#646)
* fix(Settings.jsx): fix Settings inputs losing focus to main textarea * refactor(Input/index.jsx): remove console.log statement in useEffect
This commit is contained in:
parent
732a0b8029
commit
20dde44512
1 changed files with 4 additions and 4 deletions
|
|
@ -33,23 +33,23 @@ export default function TextChat({ isSearchView = false }) {
|
|||
const [showBingToneSetting, setShowBingToneSetting] = useState(false);
|
||||
|
||||
const isNotAppendable = latestMessage?.unfinished & !isSubmitting || latestMessage?.error;
|
||||
const { conversationId, jailbreak } = conversation || {};
|
||||
|
||||
// auto focus to input, when enter a conversation.
|
||||
useEffect(() => {
|
||||
const { conversationId } = conversation || {};
|
||||
if (!conversationId) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevents Settings from not showing on new conversation, also prevents showing toneStyle change without jailbreak
|
||||
if (conversationId === 'new' || !conversation?.jailbreak) {
|
||||
if (conversationId === 'new' || !jailbreak) {
|
||||
setShowBingToneSetting(false);
|
||||
}
|
||||
|
||||
if (conversationId !== 'search') {
|
||||
inputRef.current?.focus();
|
||||
}
|
||||
}, [conversation]);
|
||||
}, [conversationId, jailbreak]);
|
||||
|
||||
useEffect(() => {
|
||||
const timeoutId = setTimeout(() => {
|
||||
|
|
@ -135,7 +135,7 @@ export default function TextChat({ isSearchView = false }) {
|
|||
|
||||
return (
|
||||
<>
|
||||
<div className="fixed bottom-0 left-0 w-full md:absolute border-transparent bg-gradient-to-b from-transparent via-white to-white pt-6 dark:border-white/20 dark:via-gray-800 dark:to-gray-800">
|
||||
<div className="fixed bottom-0 left-0 w-full border-transparent bg-gradient-to-b from-transparent via-white to-white pt-6 dark:border-white/20 dark:via-gray-800 dark:to-gray-800 md:absolute">
|
||||
<div className="relative py-2 md:mb-[-16px] md:py-4 lg:mb-[-32px]">
|
||||
<span className="flex w-full flex-col items-center justify-center gap-0 md:order-none md:m-auto md:gap-2">
|
||||
<OpenAIOptions />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue