Explorar el Código

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

David Luzar hace 5 años
padre
commit
83199164ae
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      src/components/App.tsx

+ 5 - 0
src/components/App.tsx

@@ -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