Browse Source

check for activeEmbeddable in handleWheel

zsviczian 3 weeks ago
parent
commit
1098a0b909
1 changed files with 2 additions and 7 deletions
  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]) {