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

AG-13798 Fix 'wheel' zoom events in Safari #3332

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

olegat
Copy link
Contributor

@olegat olegat commented Jan 6, 2025

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 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.

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.
@olegat olegat requested a review from jacobp100 January 6, 2025 16:51
@olegat olegat marked this pull request as ready for review January 6, 2025 16:51
@olegat olegat requested a review from alantreadway as a code owner January 6, 2025 16:51
Copy link
Contributor

github-actions bot commented Jan 6, 2025

Snapshots automatically updated, please review before merge: diff

Copy link
Contributor

@jacobp100 jacobp100 left a 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;
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK it's necessary because the immediate parent has pointer-events: none

Screenshot 2025-01-07 at 08 48 32

Copy link
Member

@alantreadway alantreadway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alantreadway alantreadway merged commit c984686 into latest Jan 7, 2025
26 checks passed
@alantreadway alantreadway deleted the AG-13798/dev_regression_safari_wheel branch January 7, 2025 13:18
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.

3 participants