-
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
Workaround webkit disrespecting e.preventDefault() #6450
Conversation
ae84dec
to
26736b8
Compare
26736b8
to
927fb9c
Compare
Let's just bind both |
src/ui/bind_handlers.js
Outdated
// Bind touchmove with passive: false on iOS because, even though | ||
// onTouchMove only fires a map event, binding with passive: true causes | ||
// iOS not to respect e.preventDefault() in _other_ handlers, even if they | ||
// are non-passive. https://bugs.webkit.org/show_bug.cgi?id=182521 |
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.
Is this the right WebKit bug URL?
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.
Whoops, I must have copied from the wrong tab, thanks.
927fb9c
to
873c74d
Compare
@jfirebaugh updated |
src/ui/bind_handlers.js
Outdated
DOM.addEventListener(el, 'touchstart', onTouchStart, {passive: false}); | ||
DOM.addEventListener(el, 'touchmove', onTouchMove, {passive: true}); // `passive: true` because onTouchMove only sends a map event. | ||
DOM.addEventListener(el, 'touchmove', onTouchMove, {passive: false}); | ||
|
||
DOM.addEventListener(el, 'touchend', onTouchEnd); // The real action is in DragPanHandler and TouchZoomRotateHandler. |
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.
You can remove the comment here.
873c74d
to
dcf2c86
Compare
Follow-up to #6248 to work around https://bugs.webkit.org/show_bug.cgi?id=182521