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();
|
event.preventDefault();
|
||||||
return true;
|
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") {
|
if (platformModifierKey(event) && event.code === "KeyK") {
|
||||||
searchSpotlight.open();
|
searchSpotlight.open();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user