Skip to content

Commit

Permalink
fix: ignore wheel events while panning
Browse files Browse the repository at this point in the history
  • Loading branch information
micahg committed Aug 8, 2024
1 parent 7024ee6 commit c2a45ce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/mui/src/components/ContentEditor/ContentEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,11 @@ const ContentEditor = ({
} else if (e.deltaY < 0) {
worker.postMessage({ cmd: "brush_dec", x: e.offsetX, y: e.offsetY });
}
} else if (internalState.rec && internalState.act === "select") {
// ignore wheel on select
} else if (
internalState.rec &&
(internalState.act === "select" || internalState.act === "move")
) {
// ignore wheel on select or while panning (move)
sm.transition("done");
}
});
Expand Down

0 comments on commit c2a45ce

Please sign in to comment.