diff --git a/app/components/mask.tsx b/app/components/mask.tsx index de724e26..d48ed7c2 100644 --- a/app/components/mask.tsx +++ b/app/components/mask.tsx @@ -185,7 +185,12 @@ function ContextPromptItem(props: { className={chatStyle["context-content"]} rows={focusingInput ? 5 : 1} onFocus={() => setFocusingInput(true)} - onBlur={() => setFocusingInput(false)} + onBlur={() => { + setFocusingInput(false); + // If the selection is not removed when the user loses focus, some + // extensions like "Translate" will always display a floating bar + window?.getSelection()?.removeAllRanges(); + }} onInput={(e) => props.update({ ...props.prompt,