瀏覽代碼

check for activeEmbeddable in handleWheel

zsviczian 3 周之前
父節點
當前提交
1098a0b909
共有 1 個文件被更改,包括 2 次插入7 次删除
  1. 2 7
      packages/excalidraw/components/App.tsx

+ 2 - 7
packages/excalidraw/components/App.tsx

@@ -2737,12 +2737,6 @@ class App extends React.Component<AppProps, AppState> {
       addEventListener(window, EVENT.RESIZE, this.onResize, false),
       addEventListener(window, EVENT.UNLOAD, this.onUnload, false),
       addEventListener(window, EVENT.BLUR, this.onBlur, false),
-      addEventListener(
-        this.excalidrawContainerRef.current,
-        EVENT.WHEEL,
-        this.handleWheel,
-        { passive: false },
-      ),
       addEventListener(
         this.excalidrawContainerRef.current,
         EVENT.DRAG_OVER,
@@ -11170,7 +11164,8 @@ class App extends React.Component<AppProps, AppState> {
           event.target instanceof HTMLCanvasElement ||
           event.target instanceof HTMLTextAreaElement ||
           event.target instanceof HTMLIFrameElement
-        )
+        ) ||
+        this.state.activeEmbeddable?.state === "active"
       ) {
         // prevent zooming the browser (but allow scrolling DOM)
         if (event[KEYS.CTRL_OR_CMD]) {