🐛 fix settimeout blur

This commit is contained in:
Nate Sesti 2024-02-21 14:20:12 -08:00
parent 1d9a65c0bd
commit 77a898186f

View file

@ -369,19 +369,18 @@ function TipTapEditor(props: TipTapEditorProps) {
};
}, []);
// IDE event listeners
useEffect(() => {
if (!props.isMainInput) {
return;
}
if (editor) {
if (editor && document.hasFocus()) {
editor.commands.focus();
setTimeout(() => {
// https://github.com/continuedev/continue/pull/881
editor.commands.blur();
}, 0);
}, 0);
}
const handler = async (event: any) => {