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
|
// prevent browser pinch zoom on DOM elements
|
||||||
if (!(event.target instanceof HTMLCanvasElement)) {
|
if (!(event.target instanceof HTMLCanvasElement) && event.ctrlKey) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user