-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Check for duplicates
- I have searched for similar issues before opening a new one.
Description
Using @blockly/keyboard-navigation v3.0.3 (letest), and Blockly v12.5.0 or 12.5.1 (latest)
Attempting to initialize a KeyboardNavigation instance for a workspace throws the following error:
Uncaught Error: Shortcut named "menu" already exists.
at ShortcutRegistry$$module$build$src$core$shortcut_registry.register
at nt.registerShortcut
at nt.install
at dt.registerDefaults
at dt.init
at new yt
I believe that this is due to the addition of registerShowContextMenu() in packages/blockly/core/shortcut_item.ts
It registers the "menu" shortcut in the shortcuts registry. The keyboard-navigation plugin tries to register "menu" as well, which throws the error.
This issue did not exist before blockly v12.5.0
Reproduction steps
- Install @blockly/keyboard-navigation v3.0.3 (latest) and Blockly v12.5.0 or 12.5.1
- Attempt to initialize keyboard navigation by creating an instance on KeyboardNavigation for a workspace.
- Error is thrown
Priority
No response
Stack trace
Uncaught Error: Shortcut named "menu" already exists.
at ShortcutRegistry$$module$build$src$core$shortcut_registry.register
at nt.registerShortcut
at nt.install
at dt.registerDefaults
at dt.init
at new yt
Screenshots
No response
Browsers
Found on Chrome, but I expect the issue is browser-independent.
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status