Do not invert deltaX / deltaY in wheelHandler when the shift key is down #9660
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.
Description
This PR addresses #3755. The fix was to remove the code in Data Grid that inverted
deltaXanddeltaYwhen the shift key is pressed during wheel events. It is unnecessary code.Trackpads already have gestures for scrolling vertically and scrolling horizontally, so shift key inversion isn't necessary for wheel events that come from a trackpad.
By the time a React onWheel handler runs, the
deltaXanddeltaYvalues are already inverted by the browser engine when the event comes from a mouse and the shift key is down.So this code:
was causing a double inversion of
deltaXanddeltaYfor mouse-initiated wheel events.(*And, there is no way in a React
onWheelevent handler to tell whether the event came from a trackpad or a mouse.)Release Notes
New Features
Bug Fixes
QA Notes