fix(editor): prevent Tab key propagation outside editor (#11531)

Closes: BS-2964
This commit is contained in:
Saul-Mirone
2025-04-08 10:03:06 +00:00
parent 280227fa5f
commit 780c35eabe
5 changed files with 75 additions and 16 deletions
@@ -0,0 +1,16 @@
import { KeymapExtension } from '@blocksuite/std';
export const fallbackKeymap = KeymapExtension(() => {
return {
Tab: ctx => {
const event = ctx.get('defaultState').event;
event.stopPropagation();
event.preventDefault();
},
'Shift-Tab': ctx => {
const event = ctx.get('defaultState').event;
event.stopPropagation();
event.preventDefault();
},
};
});