mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: prevent browser from scrolling when panning (#4489)
This commit is contained in:
parent
04f852a40a
commit
bae0e985b2
2 changed files with 3 additions and 0 deletions
|
@ -1765,6 +1765,7 @@ class App extends React.Component<AppProps, AppState> {
|
|||
if (event.key === KEYS.SPACE && gesture.pointers.size === 0) {
|
||||
isHoldingSpace = true;
|
||||
setCursor(this.canvas, CURSOR_TYPE.GRABBING);
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
if (event.key === KEYS.G || event.key === KEYS.S) {
|
||||
|
@ -2731,6 +2732,7 @@ class App extends React.Component<AppProps, AppState> {
|
|||
return false;
|
||||
}
|
||||
isPanning = true;
|
||||
event.preventDefault();
|
||||
|
||||
let nextPastePrevented = false;
|
||||
const isLinux = /Linux/.test(window.navigator.platform);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue