mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-10 05:29:08 +08:00
fix(editor): prevent Tab key propagation outside editor (#11531)
Closes: BS-2964
This commit is contained in:
@@ -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();
|
||||
},
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user