react-hotkeys
react-hotkeys copied to clipboard
cmd+c triggers action bound to c even when allowCombinationSubmatches is false [BUG]
Describe the bug I have an action bound to c but cmd+c seems to trigger the action regardless what allowCombinationSubmatches is set to. There is no action bound to cmd+c in my code.
How are you using react hotkeys components? (HotKeys, GlobalHotKeys, IgnoreKeys etc)
GlobalHotKeys
is used in my component.
Expected behavior Pressing cmd+c does not trigger the action bound to c.
Platform (please complete the following information):
- Version of react-hotkeys: 2.0.0-pre9
- Browser - chrome
What Configuration options are you using? I am using the default configuration.
@jiemeechong801 fixed a related bug -- does it reproduce on my fork? https://github.com/ibash/react-hotkeys/commit/23c363b901aeb1765be31f04039a4123b567baa2
@jiemeechong801 fixed a related bug -- does it reproduce on my fork? ibash@23c363b
I tried your fork, I have the "r" key registered and on osx, when pressing cmd+r, the action associated to the "r" key is triggered anyway
I could as well reproduce it with the cmd+enter. With both this and react-hotkeys-ce
package. In my case, the child component consumes the cmd+enter event with its enter handler and the parent component that should react to cmd+enter will never get a chance. It would be nice if we could at least specify the stopEventPropagationAfterHandling
option locally.