Skip to content

[Web] Report the hovering pointer's type in Hover gesture events - #4631

Open
m-bert wants to merge 2 commits into
mainfrom
@mbert/web-hover-pointer-type
Open

m-bert wants to merge 2 commits into
mainfrom
@mbert/web-hover-pointer-type

Conversation

@m-bert

@m-bert m-bert commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

Description

On web, HoverGestureHandler reported pointer type mouse for a stylus. The base handler stores the pointer type only in onPointerDown, and a hover never sees a pointerdown, so the default stayed. The value also never resets, so after a pen or finger touched the view, every later hover reported that type instead.

Test plan

Hover a pen over a useHoverGesture view in Chrome: onBegin, onActivate and onUpdate report pointerType: STYLUS with stylus data, a mouse reports MOUSE. Checked on a Galaxy S24 with S Pen and on desktop Chrome with CDP pen events.

Copilot AI balanced review requested due to automatic review settings October 22, 2026 09:28

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.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 30a75539-f54d-422e-8684-b7a90fdd6c1a
📥 Commits

Reviewing files that changed from the base of the PR and between 2202d7b and 83bf3b3.

📒 Files selected for processing: 2
  • packages/react-native-gesture-handler/src/web/handlers/GestureHandler.ts
  • 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
    • Hover gestures now track the pointer type during pointer-over and pointer-move events.

The web gesture handler adds a protected setter for pointerType. The hover handler uses it to store pointer types from pointer-over and pointer-move events.

Changes: Hover pointer type tracking

Layer / File(s) Summary
Store pointer types from hover events
packages/react-native-gesture-handler/src/web/handlers/GestureHandler.ts, packages/react-native-gesture-handler/src/web/handlers/HoverGestureHandler.ts
GestureHandler adds a protected setter that stores the supplied pointer type. The hover handler assigns the event’s pointer type on pointer-over and pointer-move events.

Suggested reviewers: j-piasecki

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 83bf3

The reported hover pointer-type behavior is addressed, with no remaining actionable merge risk identified.

Pre-merge checks: Passed 3
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: reporting the hovering pointer type in web hover gesture events.
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.

This branch has not been deployed

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

2 participants