fix: pull-based clipboard text and cursor at end with br

This commit is contained in:
CREDO23 2026-03-25 16:22:32 +02:00
parent 4a5a28805d
commit f3d6ae95e1
5 changed files with 16 additions and 21 deletions

View file

@ -119,7 +119,9 @@ export const InlineMentionEditor = forwardRef<InlineMentionEditorRef, InlineMent
useEffect(() => {
if (!initialText || !editorRef.current) return;
editorRef.current.textContent = initialText + "\n";
editorRef.current.innerText = initialText;
editorRef.current.appendChild(document.createElement("br"));
editorRef.current.appendChild(document.createElement("br"));
setIsEmpty(false);
onChange?.(initialText, Array.from(mentionedDocs.values()));
editorRef.current.focus();

View file

@ -332,7 +332,7 @@ const Composer: FC = () => {
const [quickAskText, setQuickAskText] = useState<string | undefined>();
useEffect(() => {
return window.electronAPI?.onQuickAskText((text) => {
window.electronAPI?.getQuickAskText().then((text) => {
if (text) setQuickAskText(text);
});
}, []);