fix: non-letter shortcuts being swallowed by color picker (#5316)

This commit is contained in:
David Luzar 2022-06-17 12:37:11 +02:00 committed by GitHub
parent 5feacd9a3b
commit fd48c2cf79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 8 deletions

View file

@ -1694,7 +1694,9 @@ class App extends React.Component<AppProps, AppState> {
}
if (
(isWritableElement(event.target) && event.key !== KEYS.ESCAPE) ||
(isWritableElement(event.target) &&
!event[KEYS.CTRL_OR_CMD] &&
event.key !== KEYS.ESCAPE) ||
// case: using arrows to move between buttons
(isArrowKey(event.key) && isInputLike(event.target))
) {