Explorar o código

check for activeEmbeddable in handleWheel

zsviczian hai 3 semanas
pai
achega
1098a0b909
Modificáronse 1 ficheiros con 2 adicións e 7 borrados
  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.RESIZE, this.onResize, false),
       addEventListener(window, EVENT.UNLOAD, this.onUnload, false),
       addEventListener(window, EVENT.UNLOAD, this.onUnload, false),
       addEventListener(window, EVENT.BLUR, this.onBlur, false),
       addEventListener(window, EVENT.BLUR, this.onBlur, false),
-      addEventListener(
-        this.excalidrawContainerRef.current,
-        EVENT.WHEEL,
-        this.handleWheel,
-        { passive: false },
-      ),
       addEventListener(
       addEventListener(
         this.excalidrawContainerRef.current,
         this.excalidrawContainerRef.current,
         EVENT.DRAG_OVER,
         EVENT.DRAG_OVER,
@@ -11170,7 +11164,8 @@ class App extends React.Component<AppProps, AppState> {
           event.target instanceof HTMLCanvasElement ||
           event.target instanceof HTMLCanvasElement ||
           event.target instanceof HTMLTextAreaElement ||
           event.target instanceof HTMLTextAreaElement ||
           event.target instanceof HTMLIFrameElement
           event.target instanceof HTMLIFrameElement
-        )
+        ) ||
+        this.state.activeEmbeddable?.state === "active"
       ) {
       ) {
         // prevent zooming the browser (but allow scrolling DOM)
         // prevent zooming the browser (but allow scrolling DOM)
         if (event[KEYS.CTRL_OR_CMD]) {
         if (event[KEYS.CTRL_OR_CMD]) {