Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd+c triggers action bound to c even when allowCombinationSubmatches is false [BUG] #296

Open
jiemeechong801 opened this issue Nov 25, 2020 · 3 comments · Fixed by ibash/react-hotkeys#6

Comments

@jiemeechong801
Copy link

jiemeechong801 commented Nov 25, 2020

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.

@ibash
Copy link

ibash commented Mar 7, 2021

@jiemeechong801 fixed a related bug -- does it reproduce on my fork? ibash@23c363b

@joepsyko
Copy link

@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

@radoslavkarlik
Copy link

radoslavkarlik commented Apr 12, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants