Skip to content

Issue 500 diagonal scroll trackpad#873

Open
Billgonzo123 wants to merge 9 commits intonamespace-ee:mainfrom
Billgonzo123:issue-500-DiagonalScrollTrackpad
Open

Issue 500 diagonal scroll trackpad#873
Billgonzo123 wants to merge 9 commits intonamespace-ee:mainfrom
Billgonzo123:issue-500-DiagonalScrollTrackpad

Conversation

@Billgonzo123
Copy link

@Billgonzo123 Billgonzo123 commented Sep 27, 2022

Issue Number: 500

Link to issue

I restored the code from v0.21.0 and it has restored the functionality of touch pad diagonal scrolling. It does seem that on most browser you must initially move your fingers in a diagonal motion because scrolling seems to be locked to the initial direction of scrolling per event.

I have added a small bit of code so that when clicking inside the calendar component it can be dragged on the X and Y axis. To do this I turned dragStartPosition into an object containing x and y scroll values. I then use dragStartPosition.y to update the windows scroll position.

I also fixed a bug with the shiftKey modifier when scrolling. deltaY was prioritized in a ternary resulting in glitchy and confusing movement when touchpad scrolling was diagonal. deltaX is now prioritized.

@Billgonzo123
Copy link
Author

Billgonzo123 commented Sep 27, 2022

The traditionalScroll prop mentioned in the issue seems to be undefined

@Billgonzo123 Billgonzo123 marked this pull request as draft September 27, 2022 19:37
@Billgonzo123
Copy link
Author

oops, this was supposed to be a draft!

@Billgonzo123 Billgonzo123 marked this pull request as ready for review September 27, 2022 20:21
@lnagel lnagel added the outdated label Feb 5, 2026
@lnagel
Copy link
Member

lnagel commented Feb 5, 2026

This PR has been marked as outdated. Here's why:

The file this PR targets (src/lib/scroll/ScrollElement.js) no longer exists. The entire codebase has been rewritten in TypeScript, and the scroll handling component now lives at src/lib/scroll/ScrollElement.tsx. The new implementation has been completely rearchitected — it uses a createRef-based approach, Pointer Events API (replacing separate mouse/touch handlers), and has a fundamentally different scroll and drag model. The specific changes this PR introduced (making dragStartPosition an object with x/y for vertical drag support, prioritizing deltaX over deltaY in the shift+scroll handler, and adding window.scrollBy for diagonal trackpad scrolling) are no longer applicable because the scroll logic has been rewritten from scratch with its own touch and pointer handling that already accounts for both axes.

The current version is 0.30.0-beta.5 and uses TypeScript, dayjs (instead of moment), and Vite (instead of Webpack).

Thank you for the contribution! The idea/fix was appreciated even if the codebase has moved on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants