瀏覽代碼

drop onKeyDown if shift is down and element is resizing

zsviczian 1 年之前
父節點
當前提交
606c647e3d
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/components/App.tsx

+ 4 - 1
src/components/App.tsx

@@ -3543,8 +3543,11 @@ class App extends React.Component<AppProps, AppState> {
   // Input handling
   private onKeyDown = withBatchedUpdates(
     (event: React.KeyboardEvent | KeyboardEvent) => {
+      if(this.state.resizingElement && event.shiftKey) {
+        event.stopPropagation();
+        return;
+      }
       // normalize `event.key` when CapsLock is pressed #2372
-
       if (
         "Proxy" in window &&
         ((!event.shiftKey && /^[A-Z]$/.test(event.key)) ||