Horizontall scrolling on shift + mouse wheel scroll#2294
Merged
Conversation
abose
requested changes
Jun 16, 2025
There was a problem hiding this comment.
Pull Request Overview
Adds horizontal scrolling support via Shift+mouse wheel and trackpad gestures.
- Adds conditional to detect Shift key or horizontal delta for scrolling left/right.
- Applies horizontal scroll when relevant, preventing default vertical scroll.
- Preserves vertical scroll behavior with scaling for custom line heights.
Comments suppressed due to low confidence (2)
src/editor/Editor.js:449
- Add a test case to simulate
Shift + wheeland horizontal trackpad gestures to verify that horizontal scrolling is correctly applied and vertical scrolling is suppressed.
if (event.shiftKey || event.deltaX !== 0) {
src/editor/Editor.js:449
- [nitpick] Consider restricting horizontal scrolling to only when Shift is pressed (i.e., use
if (event.shiftKey)), to avoid intercepting diagonal trackpad scrolls when the user intends vertical movement.
if (event.shiftKey || event.deltaX !== 0) {
26479ba to
77104b2
Compare
|
abose
approved these changes
Jun 16, 2025
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.



Scroll horizontally when mouse wheel is scrolled along with
Shiftkey press.Visual reference
https://github.com/user-attachments/assets/a55e2cbe-4e5d-4bbe-adec-59441741dca0