Skip to content

[Web] Start hover on the first pointer move when pointerenter was missed - #4624

Merged
m-bert merged 3 commits into
software-mansion:mainfrom
collectioneur:@collectioneur/web-hover-start-on-pointer-move
Oct 22, 2026
Merged

m-bert merged 3 commits into
software-mansion:mainfrom
collectioneur:@collectioneur/web-hover-start-on-pointer-move

Conversation

@collectioneur

@collectioneur collectioneur commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Description

On web, HoverGestureHandler begins only on the DOM pointerenter event. 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, pointerenter fires before the listeners exist. The hover then never begins, even though pointermove events keep arriving, until the pointer leaves the view and enters it again.

onPointerMove now begins the hover (through onPointerMoveOver) when the handler is still UNDETERMINED, 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.0 as 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.

Copilot AI balanced review requested due to automatic review settings October 21, 2026 09:40
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 36787370-8db0-47d5-93ac-9ab3dd9e1314
📥 Commits

Reviewing files that changed from the base of the PR and between 9289b88 and ca694ac.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 22799dbe-c2c0-415e-af5f-5bef1dff051f
📥 Commits

Reviewing files that changed from the base of the PR and between 3c765a8 and 9289b88.

📒 Files selected for processing: 1
  • packages/react-native-gesture-handler/src/web/handlers/HoverGestureHandler.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Improved hover gesture handling when pointer movement occurs during the initial gesture state.
    • Pointer movement is now recognized correctly before the hover gesture becomes fully active, providing more reliable hover interactions.

The web hover handler now processes pointer moves received while its state is UNDETERMINED. It calls onPointerMoveOver and returns without further processing.

Changes: Hover pointer move handling

Layer / File(s) Summary
Handle pointer moves while undetermined
packages/react-native-gesture-handler/src/web/handlers/HoverGestureHandler.ts
When the handler is UNDETERMINED, onPointerMove calls onPointerMoveOver and returns. Other pointer-move processing remains unchanged.

Suggested reviewers: m-bert

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 9289b

No actionable merge-blocking risk remains in the hover pointer-move change.

Pre-merge checks: Passed 3
Check name Status Explanation
Title check Passed The title clearly describes the main change: starting the hover on the first pointer move when the pointerenter event was missed.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@collectioneur
collectioneur marked this pull request as ready for review October 21, 2026 09:51
@m-bert
m-bert merged commit 0b36e9d into software-mansion:main Oct 22, 2026
10 checks passed
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.

3 participants