Skip to content

Commit 63feec2

Browse files
authored
feat(bundle): prevent loss of focus after pressing tab or shift+tab (#287)
1 parent cba9f28 commit 63feec2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/bundle/wysiwyg-preset.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import {EditorPreset} from './Editor';
1717
import {wCommandMenuConfigByPreset, wSelectionMenuConfigByPreset} from './config/wysiwyg';
1818
import {emojiDefs} from './emoji';
1919

20+
const DEFAULT_IGNORED_KEYS = ['Tab', 'Shift-Tab'] as const;
21+
2022
export type ExtensionsOptions = BehaviorPresetOptions & FullPresetOptions;
2123

2224
export type BundlePresetOptions = ExtensionsOptions &
@@ -203,6 +205,7 @@ export const BundlePreset: ExtensionAuto<BundlePresetOptions> = (builder, opts)
203205
}
204206

205207
const ignoreKeysList = opts.ignoreKeysList?.slice() ?? [];
208+
ignoreKeysList.push(...DEFAULT_IGNORED_KEYS);
206209
for (const action of ignoreActions) {
207210
const key = f.toPM(action);
208211
if (key) ignoreKeysList.push(key);

0 commit comments

Comments
 (0)