-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Disable cooperative gestures in fullscreen for touch panning and add screen reader alert for cooperative gestures warning message #12058
Conversation
619da78
to
4fdd739
Compare
4fdd739
to
bb2003b
Compare
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, few questions but nothing blocking.
src/ui/handler/scroll_zoom.js
Outdated
@@ -112,7 +112,7 @@ class ScrollZoomHandler { | |||
* const isScrollZoomEnabled = map.scrollZoom.isEnabled(); | |||
*/ | |||
isEnabled(): boolean { | |||
return !!this._enabled; | |||
return this._enabled; |
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.
Why do we need this diff, as this._active
, this._zooming
and this._enabled
may not be initialized?
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.
Good point Karim! It seemed a bit strange to be applying !!
to a value that's already a boolean, but I now realize that this is potentially a breaking change. Thoughts on setting these values to false in the constructor?
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.
false
in the constructor works, but also not against leaving as is!
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.
Readded the !!s, I've also added them to TouchPanHandler
for consistency.
Fixes #11635
Fixes https://github.com/mapbox/gl-js-team/issues/458
Before:
voiceover-main.mov
After:
voiceover-fix.mov
Launch Checklist
mapbox-gl-js
changelog:<changelog>Fix
cooperativeGesturespreventing panning on mobile while in fullscreen. Add screen reader alert for cooperative gestures warning message.</changelog>