🐛 fix settimeout blur
This commit is contained in:
parent
1d9a65c0bd
commit
77a898186f
1 changed files with 3 additions and 4 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue