Closed Alanaktion closed 6 years ago
Actually it looks like it is being accounted for as far as I understand the keyup
event, so there might be something more complicated going on. I'd welcome any outside knowledge on this one!
I can't replicate this - ⌘C copies, and C focuses to the comment text box. Can you provide steps to replicate? (I am on v18.02.19)
This seems to happen specifically if the non-modifier key is released after the modifier key, and actually affects all browsers and operating systems. I must have different muscle memory on Mac.
For example to reproduce the ⌘C issue:
That will cause both the native copy operation and the JS-based hotkey event. I'm not sure exactly how we'd want to account for something like that, but it should be doable by storing the modifier state on keydown
or something like that.
The ⌘ modifier is not explicitly checked for when matching some of the keyboard shortcuts, meaning e.g. pressing ⌘C to copy text will also trigger the C shortcut, focusing the comment textarea. This can be resolved by always checking the status of all modifier keys regardless of whether they're required to be held for the combination.