Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatePicker: fix scroll direction of mouse wheel #993

Open
wants to merge 1 commit into
base: releases/23.2
Choose a base branch
from

Conversation

bschwarzent
Copy link
Member

In commit 719bddb the mouse wheel listener of the DatePicker was changed from the legacy 'mousewheel' event to the modern 'wheel' event. Unfortunately, the sign of the scroll unit is different for these two event types [1]. The delta values in the new 'wheel' event indicate the scroll amount [2], i.e. positive numbers mean scroll down/right, while negative numbers mean scroll up/left.

To restore the previous behavior of the date picker, the sign of the 'diff' value has to be adjusted accordingly.

[1] https://developer.mozilla.org/en-US/docs/Web/API/Element/mousewheel_event
[2] https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event

379013

In commit 719bddb the mouse wheel
listener of the DatePicker was changed from the legacy 'mousewheel'
event to the modern 'wheel' event. Unfortunately, the sign of the
scroll unit is different for these two event types [1]. The delta
values in the new 'wheel' event indicate the scroll amount [2], i.e.
positive numbers mean scroll down/right, while negative numbers
mean scroll up/left.

To restore the previous behavior of the date picker, the sign of the
'diff' value has to be adjusted accordingly.

[1] https://developer.mozilla.org/en-US/docs/Web/API/Element/mousewheel_event
[2] https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event

379013
@bschwarzent bschwarzent self-assigned this May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant