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

Work around iOS 13 bug with pointer events #62

Merged
merged 5 commits into from
Nov 26, 2019
Merged

Work around iOS 13 bug with pointer events #62

merged 5 commits into from
Nov 26, 2019

Conversation

devongovett
Copy link
Member

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.

@devongovett devongovett changed the title Press ios bug Work around iOS 13 bug with pointer events Nov 14, 2019
@adobe-bot
Copy link

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) => {
Copy link
Member

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?

Copy link
Member Author

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

dannify
dannify previously approved these changes Nov 22, 2019
@adobe-bot
Copy link

Build successful! View the storybook

@adobe-bot
Copy link

Build successful! View the storybook

@dannify dannify merged commit c3c1cbb into master Nov 26, 2019
@dannify dannify deleted the press-ios-bug branch November 26, 2019 23:36
devongovett added a commit that referenced this pull request Jul 25, 2024
* 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>
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.

4 participants