mirror of
https://github.com/excalidraw/excalidraw.git
synced 2024-11-10 11:35:52 +01:00
fix: check for ctrl key when wheel event triggered to only disable zooming (#5459)
* fix: check for ctrl key when wheel event triggered to only disable zooming * remove newline
This commit is contained in:
parent
5bc40402a6
commit
6e0ac52a64
@ -1959,9 +1959,9 @@ class App extends React.Component<AppProps, AppState> {
|
||||
},
|
||||
);
|
||||
|
||||
private onWheel = withBatchedUpdates((event: MouseEvent) => {
|
||||
private onWheel = withBatchedUpdates((event: WheelEvent) => {
|
||||
// prevent browser pinch zoom on DOM elements
|
||||
if (!(event.target instanceof HTMLCanvasElement)) {
|
||||
if (!(event.target instanceof HTMLCanvasElement) && event.ctrlKey) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user