-
Notifications
You must be signed in to change notification settings - Fork 16
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
AG-13798 Fix 'wheel' zoom events in Safari #3332
Conversation
This might be because the `passive` defaults in Safari is different to other browsers. Regardless, we're adding `'wheel'` event listeners to the .ag-charts-series-area element which has the CSS value `pointer-events: none`. This is sort of asking for trouble. Making the .ag-charts-series-area have `pointer-event: auto` works on all browsers (Safari, Firefox, Chrome), although we need to set the .ag-charts-series-area's tabindex to -1 and focus on the .ag-charts-swapchain child when the series area is clicked on.
Snapshots automatically updated, please review before merge: diff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@@ -37,14 +37,14 @@ | |||
|
|||
.ag-charts-series-area { | |||
outline: none; | |||
pointer-events: none; | |||
pointer-events: auto; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t feel too strongly here, but currently we only do this if we’re overriding ‘none’ from a parent element
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
https://ag-grid.atlassian.net/browse/AG-13798
This might be because the
passive
defaults in Safari is different to other browsers. Regardless, we're adding'wheel'
event listeners to the .ag-charts-series-area element which has the CSS valuepointer-events: none
. This is sort of asking for trouble.Making the .ag-charts-series-area have
pointer-event: auto
works on all browsers (Safari, Firefox, Chrome), although we need to set the .ag-charts-series-area's tabindex to -1 and focus on the .ag-charts-swapchain child when the series area is clicked on.