-
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
I am using Blockly within a larger application, which also registers keyboard shortcuts.
Blockly shortcuts are handled via a keydown event listener on the document (see https://github.com/google/blockly/blob/master/core/inject.ts#L336).
My application also handles copy-paste shortcuts, but the listeners are added to the element on which the shortcuts are handled.
However, Blockly's shortcuts are also invoked when the workspace is not in focus, interfering with the application's shortcuts.
It seems best to either add Blockly's listener on the workspace's element, or only invoke the shortcuts if the main workspace is focused (see https://github.com/google/blockly/blob/master/core/inject.ts#L307).
Reproduction steps
Stack trace
No response
Screenshots
No response
Browsers
No response