react-shortcuts
react-shortcuts copied to clipboard
Calls stopPropagation even when no key combo applies
I've noticed that because react-shortcuts overrides combokey's handleKey method, it doesn't check to see if a key combo in the key map actually applies before applying logic to preventDefault or stopPropagation. Since the stopPropagation prop defaults to true, this can result in other components on the page which react to keyboard events (like a select combo box) to stop receiving events, even though they don't interfere with the registered key combos.
I see that the isolate prop was added to help with this scenario, but since it defaults to false, it creates an API where the minimal use case introduces this sort of bug.
Should isolate be true by default?