🐛 fix focus bug on jetbrains+linux

This commit is contained in:
Nate Sesti 2024-03-07 12:05:45 -08:00
parent ca493ff195
commit d66c9daca1
2 changed files with 11 additions and 10 deletions

View file

@ -174,7 +174,7 @@ const jetbrainsShortcuts: KeyboardShortcutProps[] = [
{
mac: "⌘ ⌫",
windows: "⌃ ⌫",
description: "Cancel respoonse",
description: "Cancel response",
},
{
mac: "⌘ '",

View file

@ -509,15 +509,16 @@ function TipTapEditor(props: TipTapEditorProps) {
],
);
useEffect(() => {
if (props.isMainInput && editor && document.hasFocus()) {
editor.commands.focus();
// setTimeout(() => {
// // https://github.com/continuedev/continue/pull/881
// editor.commands.blur();
// }, 0);
}
}, [editor, props.isMainInput, historyLength, ignoreHighlightedCode]);
// On linux+jetbrains only was stealing focus
// useEffect(() => {
// if (props.isMainInput && editor && document.hasFocus()) {
// editor.commands.focus();
// // setTimeout(() => {
// // // https://github.com/continuedev/continue/pull/881
// // editor.commands.blur();
// // }, 0);
// }
// }, [editor, props.isMainInput, historyLength, ignoreHighlightedCode]);
const [showDragOverMsg, setShowDragOverMsg] = useState(false);