fix: suppress canvas shortcuts when contenteditable is focused (BlockNote)

This commit is contained in:
Hiren Kangad
2026-03-13 11:21:27 +05:30
parent 2cede1ae95
commit 02597abc9d
+5 -1
View File
@@ -49,7 +49,11 @@ export function useShortcutHandler(deps: ShortcutHandlerDeps) {
useEffect(() => {
async function onKeyDown(e: KeyboardEvent) {
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) return;
if (
e.target instanceof HTMLInputElement ||
e.target instanceof HTMLTextAreaElement ||
(e.target instanceof HTMLElement && e.target.isContentEditable)
) return;
const scene = canvasRef.current?.getScene();
const selection = selectionRef.current;