Skip to content

React Events: fix cancel events for Press#15563

Merged
necolas merged 1 commit intofacebook:masterfrom
necolas:react-events/fix-press-cancel
May 3, 2019
Merged

React Events: fix cancel events for Press#15563
necolas merged 1 commit intofacebook:masterfrom
necolas:react-events/fix-press-cancel

Conversation

@necolas
Copy link
Copy Markdown
Contributor

@necolas necolas commented May 3, 2019

  • Fixes a bug in the cancellation logic. The cancel events are now correctly listened to on the root.
  • Fixes cancellation in Safari by using the dragstart event as a proxy for cancellation (i.e., the event dispatched when move-during-press occurs on an anchor tag)

Ref #15257

@necolas necolas force-pushed the react-events/fix-press-cancel branch from 402b3a0 to 09e6a53 Compare May 3, 2019 21:40
Copy link
Copy Markdown
Contributor

@trueadm trueadm left a comment

Choose a reason for hiding this comment

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

Needs a test for cancelling with longPress (or another async event). We ran into issues before with root event collision from async events, so would be good to ensure the cancel logic doesn't regress with them too.

@necolas necolas force-pushed the react-events/fix-press-cancel branch from 09e6a53 to cf76bf9 Compare May 3, 2019 21:51
@necolas necolas force-pushed the react-events/fix-press-cancel branch from cf76bf9 to 315aef1 Compare May 3, 2019 22:00
@necolas necolas merged commit 2e5d1a8 into facebook:master May 3, 2019
@necolas necolas deleted the react-events/fix-press-cancel branch December 20, 2019 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants