Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

fix horizontal scroll via shift+wheel on mac (#1528)

David Luzar4aa1784ba374
diff --git a/src/components/App.tsx b/src/components/App.tsx
index 0857ca52cc..38cfea3ef1 100644
--- a/src/components/App.tsx
+++ b/src/components/App.tsx
@@ -2570,7 +2570,8 @@ class App extends React.Component<any, AppState> {
// scroll horizontally when shift pressed
if (event.shiftKey) {
this.setState(({ zoom, scrollX }) => ({
- scrollX: normalizeScroll(scrollX - deltaY / zoom),
+ // on Mac, shift+wheel tends to result in deltaX
+ scrollX: normalizeScroll(scrollX - (deltaY || deltaX) / zoom),
}));
return;
}