diff --git a/src/renderer/src/pages/home/Inputbar/Inputbar.tsx b/src/renderer/src/pages/home/Inputbar/Inputbar.tsx index cf006c1892..5e03167927 100644 --- a/src/renderer/src/pages/home/Inputbar/Inputbar.tsx +++ b/src/renderer/src/pages/home/Inputbar/Inputbar.tsx @@ -903,10 +903,8 @@ const Inputbar: FC = ({ assistant: _assistant, setActiveTopic, topic }) = styles={{ textarea: TextareaStyle }} onFocus={(e: React.FocusEvent) => { setInputFocus(true) - const textArea = e.target - if (textArea) { - const length = textArea.value.length - textArea.setSelectionRange(length, length) + if (e.target.value.length === 0) { + e.target.setSelectionRange(0, 0) } }} onBlur={() => setInputFocus(false)}