don't prevent select-element devTools action (#1446)

This commit is contained in:
David Luzar 2020-04-17 00:18:45 +02:00 committed by GitHub
parent 519a9ca493
commit 83199164ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1048,6 +1048,11 @@ class App extends React.Component<any, AppState> {
// Input handling
private onKeyDown = withBatchedUpdates((event: KeyboardEvent) => {
// ensures we don't prevent devTools select-element feature
if (event[KEYS.CTRL_OR_CMD] && event.shiftKey && event.key === "C") {
return;
}
if (
(isWritableElement(event.target) && event.key !== KEYS.ESCAPE) ||
// case: using arrows to move between buttons