Repository navigation
[Web] Start hover on the first pointer move when pointerenter was missed - #4624
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Description
On web,
HoverGestureHandlerbegins only on the DOMpointerenterevent. The v3 detector attaches its pointer listeners in an effect, after paint, so when the view mounts under a pointer that is already resting there,pointerenterfires before the listeners exist. The hover then never begins, even thoughpointermoveevents keep arriving, until the pointer leaves the view and enters it again.onPointerMovenow begins the hover (throughonPointerMoveOver) when the handler is stillUNDETERMINED, so the first move over the view starts the gesture.This was found while migrating Expensify's charts to the hook API in Expensify/App#103457: the chart tooltip didn't show when the cursor was already over the chart before it was drawn (report, investigation).
Test plan
Tested in Expensify/App#103457, where the same change is applied to
3.3.0as a patch: on web, quickly switching charts in the Insights card while keeping the cursor over the chart area, the tooltip of the newly drawn chart shows on the first mouse move, without leaving and re-entering the chart. Video of the fix is in this comment.