|
|
|
|
@ -2515,7 +2515,7 @@ class App extends React.Component<AppProps, AppState> {
@@ -2515,7 +2515,7 @@ class App extends React.Component<AppProps, AppState> {
|
|
|
|
|
addEventListener( |
|
|
|
|
this.excalidrawContainerRef.current, |
|
|
|
|
EVENT.WHEEL, |
|
|
|
|
this.onWheel, |
|
|
|
|
this.handleWheel, |
|
|
|
|
{ passive: false }, |
|
|
|
|
), |
|
|
|
|
addEventListener(window, EVENT.MESSAGE, this.onWindowMessage, false), |
|
|
|
|
@ -4323,13 +4323,6 @@ class App extends React.Component<AppProps, AppState> {
@@ -4323,13 +4323,6 @@ class App extends React.Component<AppProps, AppState> {
|
|
|
|
|
}, |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
private onWheel = withBatchedUpdates((event: WheelEvent) => { |
|
|
|
|
// prevent browser pinch zoom on DOM elements
|
|
|
|
|
if (!(event.target instanceof HTMLCanvasElement) && event.ctrlKey) { |
|
|
|
|
event.preventDefault(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
private onKeyUp = withBatchedUpdates((event: KeyboardEvent) => { |
|
|
|
|
if (event.key === KEYS.SPACE) { |
|
|
|
|
if (this.state.viewModeEnabled) { |
|
|
|
|
@ -10089,6 +10082,11 @@ class App extends React.Component<AppProps, AppState> {
@@ -10089,6 +10082,11 @@ class App extends React.Component<AppProps, AppState> {
|
|
|
|
|
event.target instanceof HTMLIFrameElement |
|
|
|
|
) |
|
|
|
|
) { |
|
|
|
|
// prevent zooming the browser (but allow scrolling DOM)
|
|
|
|
|
if (event[KEYS.CTRL_OR_CMD]) { |
|
|
|
|
event.preventDefault(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|