Skip to content

[0.22] Remove PointerEvent fallback - #2902

Merged
zoontek merged 5 commits into
0.22-devfrom
remove-pointer-events-fallback
Oct 10, 2026
Merged

zoontek merged 5 commits into
0.22-devfrom
remove-pointer-events-fallback

Conversation

@zoontek

@zoontek zoontek commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Important

This PR targets the 0.22-dev branch

The new browser targets all support PointerEvent, so this PR removes the mouse / touch fallback paths.

react-native-web

  • useHover now always listens to pointerenter, pointermove and pointerleave, and reads e.pointerType directly
  • useHover drops the x / y polyfill on hover events (available since Chrome 55)
  • useHover uses new CustomEvent() in place of initCustomEvent (deprecated)
  • Removes the modality module. Its only use was to guess the pointer type when PointerEvent was not available

dom-event-testing-library

  • Removes describeWithPointerEvent, hasPointerEvent and setPointerEvent
  • Event sequences now always dispatch pointer events
  • testWithPointerType always runs for mouse, touch and pen
  • Updates the README to match. It also adds the missing error, load and pointerup event entries, and documents clearPointers.

@zoontek
zoontek requested a review from Kudo October 9, 2026 15:07
@codesandbox-ci

codesandbox-ci Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 04fab9a:

Sandbox Source
react-native-web-examples Configuration

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Size Change: -1.69 kB (-0.83%)

Total Size: 202 kB

📦 View Changed
Filename Size Change
packages/react-native-web/dist/modules/modality/index.js 0 B -1.39 kB (removed) 🏆
packages/react-native-web/dist/modules/useHover/index.js 1.02 kB -235 B (-18.68%) 👏
packages/react-native-web/dist/modules/useResponderEvents/ResponderSystem.js 5.09 kB -70 B (-1.36%)

compressed-size-action

Comment thread packages/dom-event-testing-library/README.md Outdated
@zoontek
zoontek changed the base branch from raise-browsers-target to 0.22-dev October 10, 2026 08:12
@zoontek
zoontek force-pushed the remove-pointer-events-fallback branch from 1bfc2fa to 5109ab4 Compare October 10, 2026 08:53
@zoontek
zoontek merged commit b6329ea into 0.22-dev Oct 10, 2026
6 checks passed
@zoontek
zoontek deleted the remove-pointer-events-fallback branch October 10, 2026 09:02
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