fix: prevent browser tab fallback in editor (#2123)
This commit is contained in:
parent
a0aea43e25
commit
1d2486455f
1 changed files with 8 additions and 0 deletions
|
|
@ -236,6 +236,14 @@ export default function PageEditor({
|
|||
event.preventDefault();
|
||||
return true;
|
||||
}
|
||||
if (event.key === "Tab") {
|
||||
const editor = editorRef.current;
|
||||
if (!editor) return false;
|
||||
event.preventDefault();
|
||||
return editor.view.someProp("handleKeyDown", (f) =>
|
||||
f(editor.view, event)
|
||||
);
|
||||
}
|
||||
if (platformModifierKey(event) && event.code === "KeyK") {
|
||||
searchSpotlight.open();
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue