🐛 fix focus bug on jetbrains+linux
This commit is contained in:
parent
ca493ff195
commit
d66c9daca1
2 changed files with 11 additions and 10 deletions
|
|
@ -174,7 +174,7 @@ const jetbrainsShortcuts: KeyboardShortcutProps[] = [
|
|||
{
|
||||
mac: "⌘ ⌫",
|
||||
windows: "⌃ ⌫",
|
||||
description: "Cancel respoonse",
|
||||
description: "Cancel response",
|
||||
},
|
||||
{
|
||||
mac: "⌘ '",
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue