Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
W3CPointerEvents: properly update hit path during native gestures (#3…
…7638) Summary: Pull Request resolved: #37638 Changelog: [Android] [Fixed] - W3CPointerEvents: properly update hit path during native gestures Per [the W3C spec](https://www.w3.org/TR/pointerevents/#the-pointercancel-event), we need to fire pointerout and pointerleave after firing a pointercancel. However, in cases where the pointer doesn't physically leave the target after a cancel (e.g. scrolling by clicking and dragging), we would never re-fire a pointerenter event once the native gesture was completed. This change fixes the bug by clearing out the last hit path (and other relevant state) for the pointer when we start handling a native gesture. Then we'll re-fire a pointerenter as expected upon the next motion event (due to the logic in handleHitStateDivergence). Note: this bug only affected hovering pointers (e.g. mouse) because for non-hovering pointers the native gesture won't end unless the pointer is physically removed (i.e. finger is lifted). Reviewed By: javache Differential Revision: D46226021 fbshipit-source-id: de796217bac27b169ccf9ed5e0df85f7b63d8c5e
- Loading branch information