fix: Mac trackpad horizontal scroll incorrectly triggers zoom in Agent Canvas (#1211)#1220
Merged
bytecii merged 9 commits intoeigent-ai:mainfrom Feb 12, 2026
Conversation
bytecii
reviewed
Feb 11, 2026
Collaborator
bytecii
left a comment
There was a problem hiding this comment.
In general LGTM. Left one comment
| if (isEditMode) return; | ||
|
|
||
| // Mac trackpad pinch-to-zoom sends ctrlKey=true — prevent browser zoom when zoom is disabled | ||
| if (e.ctrlKey) { |
Collaborator
There was a problem hiding this comment.
Will this be something can influence the windows user? For example windows user expect the ctrl + mouse to zoom the page?
Contributor
Author
There was a problem hiding this comment.
Yes, this will affect Windows users: Ctrl + mouse wheel zoom will be blocked over the Agent Canvas. The ctrlKey check was added to prevent Mac trackpad pinch zoom, but it also blocks Windows Ctrl+wheel zoom.
Collaborator
There was a problem hiding this comment.
Maybe we can add some comments here to help to track for future changes
Contributor
Author
There was a problem hiding this comment.
@bytecii I added comment for this. Regards
…ub.com/spider-yamet/eigent into feat/MAC-Trackpad-horizontal-scrolling
bytecii
approved these changes
Feb 12, 2026
Contributor
Author
|
@bytecii @Wendong-Fan could you please check the the PR status? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1211 — On Mac trackpads, two-finger horizontal scrolling in the Agent Canvas (Workflow) was triggering zoom instead of horizontal pan.
Root cause
deltaY(vertical scroll) to control horizontal pan.deltaX, which was ignored.ctrlKey: true, which was not handled, so the browser default zoom could run.Solution
deltaXfor horizontal trackpad scroll (two-finger swipe left/right).deltaYfor vertical scroll mapped to horizontal pan (mouse wheel / trackpad vertical swipe).ctrlKeycheck to prevent pinch-to-zoom when zoom is disabled in non-edit mode.Changes
workflowWheelHandler.tsfor clarity and testability.WorkFlow/index.tsxto usecreateWorkflowWheelHandler.Testing
npm run test -- test/unit/components/WorkFlow/workflowWheelHandler.test.ts