check for activeEmbeddable in handleWheel

This commit is contained in:
zsviczian
2025-08-20 18:59:52 +02:00
committed by GitHub
parent c78e4aab7f
commit 1098a0b909

View File

@@ -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]) {