Skip to content

Android: hover never reaches a View with pointerEvents="box-only", or the content of a ScrollView with scrollEnabled={false} #59966

Open

Description

@YevheniiKotyrlo

Description

On Android, a View with pointerEvents="box-only", and every view inside a ScrollView with scrollEnabled={false}, gets no hover: a stylus hovering them makes none of them send TYPE_VIEW_HOVER_ENTER.

Related: #59046, where a ReactViewGroup skips View.onHoverEvent while dispatchPointerEvents is on.

Steps to reproduce

The reproducer renders three accessible Views: auto View with the default pointerEvents, box-only View with pointerEvents="box-only", and View inside a ScrollView with scrollEnabled false.

  1. Clone the reproducer and, with one Android 11 or newer device attached, run ./reproduce.sh. It builds and installs the release APK, hovers a stylus registered through the device's uinput over each View, above its label, and reads adb shell uiautomator events.
  2. Or by hand: cd ReproducerApp/android && ./gradlew assembleRelease && adb install -r app/build/outputs/apk/release/app-release.apk, open the app, run adb shell uiautomator events, and hover a mouse or a stylus over each View, above its label.

Expected: each View sends TYPE_VIEW_HOVER_ENTER, as auto View does; the children of a box-only View and a none View still get no hover, and a ScrollView with scrollEnabled={false} still ignores the mouse wheel.
Seen: only auto View sends one.

React Native Version

0.90.0-nightly-20261111-1273ca128

Affected Platforms

Runtime - Android

Output of npx @react-native-community/cli info

System:
  OS: Windows 11 10.0.26300
  CPU: "(32) x64 AMD Ryzen 9 9950X3D 16-Core Processor          "
  Memory: 98.76 GB / 255.67 GB
Binaries:
  Node:
    version: 26.12.1
    path: C:\Program Files\nodejs\node.EXE
  Yarn:
    version: 1.22.22
    path: C:\Users\<user>\AppData\Roaming\npm\yarn.CMD
  npm:
    version: 12.2.1
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK:
    AllowDevelopmentWithoutDevLicense: Enabled
    Versions:
      - 10.0.19041.0
      - 10.0.26100.0
IDEs:
  Android Studio: AI-262.9437.185.2621.16467767
  Visual Studio: Not Found
Languages:
  Java:
    version: 17.0.20.1
    path: C:\Program Files\Microsoft\jdk-17.0.20.101-hotspot\bin\javac.EXE
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 21.0.0-alpha.1
    wanted: 21.0.0-alpha.1
  react:
    installed: 19.3.0
    wanted: 19.3.0
  react-native:
    installed: 0.90.0-nightly-20261111-1273ca128
    wanted: 0.90.0-nightly-20261111-1273ca128
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

No error is logged. ./reproduce.sh at the reproducer's ebbf040, on a Galaxy S23:

device: SM-S911B, Android 14 (API 34), arm64-v8a
react-native 0.90.0-nightly-20261111-1273ca128
== ./gradlew :app:assembleRelease -PreactNativeArchitectures=arm64-v8a
hovering "auto View" at (540, 237)
hovering "box-only View" at (540, 729)
hovering "View inside a ScrollView with scrollEnabled false" at (540, 1221)
auto View: TYPE_VIEW_HOVER_ENTER
box-only View: no TYPE_VIEW_HOVER_ENTER
View inside a ScrollView with scrollEnabled false: no TYPE_VIEW_HOVER_ENTER
SUMMARY: a hover reaches the auto View but neither the box-only View nor the View inside the ScrollView with scrollEnabled={false}

ReactViewGroup.kt, the three scroll views and PointerEvents.kt are the same on main at 6125a5d as at this nightly's 1273ca1.

MANDATORY Reproducer

https://github.com/YevheniiKotyrlo/rn-box-only-hover-repro

Screenshots and Videos

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions