-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Work around iOS 13 bug with pointer events #62
Conversation
Build successful! View the storybook |
// Safari on iOS < 13.2 does not implement pointerenter/pointerleave events correctly. | ||
// Use pointer move events instead to implement our own hit testing. | ||
// See https://bugs.webkit.org/show_bug.cgi?id=199803 | ||
let onPointerMove = (e: PointerEvent) => { |
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.
do we want to only use this for browsers that don't work correctly and use the onPointerEnter/Leave for the ones that are correct?
is there any easy way for us to actually check?
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'm not really sure how we could detect it...
Build successful! View the storybook |
Build successful! View the storybook |
* Move Popover padding and add ref * Picker Dropdown using rainbow Popover * Prep for invalid state * review updates * Update picker styles to share menu * simplify grid * some API review * fix validation icon * Add missing types and functionality * add min width and quiet width handling * use a better minwidth for picker * fix isOpen style * review comments * fix placeholder and select value * fix textValue * fix crash in icons story * fix some invalid styles * Combobox (#100) * Combobox * Fix remaining ts issues * explain padding * Reviews * fix crash in icons story * apply same icon story crash fix from picker PR --------- Co-authored-by: Devon Govett <devongovett@gmail.com> Co-authored-by: danilu <danilu@adobe.com> --------- Co-authored-by: Devon Govett <devongovett@gmail.com> Co-authored-by: danilu <danilu@adobe.com>
Related issue: RSP-1383
iOS < 13.2 has a bug with pointer events where onPointerEnter and onPointerLeave are never called. This resulted in active state persisting after the user drags their touch out of the target. This PR works around it by registering a document level onPointerMove handler and doing our own hit testing, like we have already for touch events.