mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 06:23:06 +08:00
fix: prevent browser tab fallback in editor (#2123)
This commit is contained in:
committed by
GitHub
parent
a0aea43e25
commit
1d2486455f
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user