mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-11-18 19:54:35 +01:00
check for activeEmbeddable in handleWheel
This commit is contained in:
@@ -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]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user