Skip to content

[pull] main from expo:main - #1197

Merged
pull[bot] merged 1 commit into
code:mainfrom
expo:main
Aug 29, 2026
Merged

[pull] main from expo:main#1197
pull[bot] merged 1 commit into
code:mainfrom
expo:main

Conversation

@pull

@pullpullBot commented Aug 29, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

…id-gesture (#49520)
# Why
Fixes#49510. On Android, a drag that starts on a `TextInput` inside a
Compose `Host` does not scroll the surrounding `ScrollView`. The same
drag started in the gap between two inputs scrolls, and both drags
scroll outside a `Host`.
The cause is a claim/release flip inside a single move event:
1.
[`ReactEditText.onTouchEvent`](https://github.com/facebook/react-native/blob/v0.86.3/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.kt#L296-L320)
calls `requestDisallowInterceptTouchEvent(true)` on `ACTION_DOWN`, then
`(false)` on the first `ACTION_MOVE` when the field cannot scroll its
own content — the ordinary single-line case.
2. `TouchDispatchingRootViewGroup` forwards both to its parent, which is
Compose's `AndroidViewHolder`.
3. That sets `PointerInteropFilter.disallowIntercept`. On the initial
pass the filter dispatches the move into the hosted view and
**consumes** it; on the final pass `changes.fastAny { it.isConsumed } &&
!disallowIntercept` now holds — it reads its own consumption as a
Compose claim and calls `stopDispatching`, sending `ACTION_CANCEL` into
the hosted subtree.
4. The React Native subtree receives nothing more for that gesture, so
the `ScrollView` never scrolls.
A drag from the gap never flips the flag, so it never reaches step 3 —
which is exactly the asymmetry in the report.
# How
`TouchDispatchingRootViewGroup` no longer forwards a
`requestDisallowInterceptTouchEvent(false)` to Compose after a `true` in
the same gesture. The latch resets on `ACTION_DOWN`. React Native
ancestors inside the wrapper still receive the release; Compose clears
its own flag when the gesture ends.
**Tradeoff worth a maintainer's call:** the latch also stops a Compose
parent, such as `HorizontalPager`, from taking over a gesture that began
on a hosted `TextInput`. Compose cancels that subtree today, so nothing
usable is lost in practice — but it is a real behavioural change, which
is why this is a draft.
# Test Plan
Measured A/B on a hosted Android emulator with EAS `preview` builds,
using the same slow 800 ms drag in both arms:
| Arm | Gesture | Stock | Patched |
| --- | --- | --- | --- |
| No sheet, no `Host` | drag from an input | scrolls | scrolls |
| No sheet, in `Host` | drag from an input | **no scroll** | scrolls |
| No sheet, in `Host` | drag from the gap | scrolls | scrolls |
| No sheet, in `Host` | tap an input | focuses | focuses |
| universal `BottomSheet` | drag from an input | **no scroll** | scrolls
|
| Compose `ModalBottomSheet` | drag from an input | **no scroll** |
scrolls |
| universal `BottomSheet` | drag on the drag handle | dismisses |
dismisses |
A downward drag from a `TextInput` also scrolls the hosted list back up
on the patched build, so the fix is not direction-specific.
`forwardedDisallowIntercept` was confirmed present in the patched APK's
dex and absent from the stock one.
In `packages/expo-ui`: `typecheck` clean, `lint --max-warnings 0` clean,
`pnpm test` 31 suites / 174 tests passing.
# Checklist
- [x] `CHANGELOG.md` entry added.
- [ ] `HorizontalPager` tradeoff above needs a maintainer's sign-off.
---
Diagnosis and fix by `@expo-bot` via `/verify --fix` on #49510 (branch
`expo-bot:verify/49510-33192081914`); it withheld the PR because three
open PRs touch `RNHostView.kt`. I checked those diffs — #48355 adds
`dispatchTouchEventToJS`/`reissueCancel`, and #49427/#49483 are
`matchContents` layout. None touch `requestDisallowInterceptTouchEvent`,
so this is not a duplicate.
Co-authored-by: expo-bot <expo-bot@users.noreply.github.com>
@pullpullBot locked and limited conversation to collaborators Aug 29, 2026
@pull
pullBot merged commit f188231 into code:mainAug 29, 2026
9 checks passed
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants