-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DatePicker: fix scroll direction of mouse wheel
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
- Loading branch information
1 parent
1e81c7e
commit 2a55103
Showing
2 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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