dmn-js
dmn-js copied to clipboard
Cmd/Ctrl + Z closes the context menu when triggered inside input

Describe the Bug
Pressing the undo shortcut causes the context menu to close instead of undo the changes within the active input.
Steps to Reproduce
Steps to reproduce the behavior:
- Type inside an input.
- Try to undo the action.
Expected Behavior
Context menu remains closed and the input action is undone.
Environment
Please complete the following information:
- Browser: Chrome 77
- OS: MacOS
- Library version: both 6 and 7
@nikku @barmac can you help me out in resolving this? I want to contribute, but haven't got any idea to tackle this. Thanks.
Sure. This issue is actually pretty straightforward. The problem is within ContextMenuBehavior. It lacks a check whether the active element is one of inputs. Consider not only input selector, but also elements with contenteditable=true.
Don't forget to add tests! :)
Have a look at contributing guidlines (i.a. commit guidlines) so that your PR can be merged quickly.
Good luck!