You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Android, filling a TextInput via browser/system autofill emits an onChange event whose nativeEvent.selection is {start: 0, end: 0} instead of pointing to the end of the inserted text.
The text is correct, but the selection is wrong — the cursor is reported at the start of the field rather than after the autofilled value. The same input entered by pasting (from clipboard) reports the correct selection, and iOS reports the correct selection for both paste and autofill.
Description
On Android, filling a
TextInputvia browser/system autofill emits anonChangeevent whosenativeEvent.selectionis{start: 0, end: 0}instead of pointing to the end of the inserted text.The
textis correct, but theselectionis wrong — the cursor is reported at the start of the field rather than after the autofilled value. The same input entered by pasting (from clipboard) reports the correct selection, and iOS reports the correct selection for both paste and autofill.Expected vs. actual
iPhone 17 (iOS 26.5) — correct in both cases
✅ Paste
+1 (555) 123-4567:✅ Browser autofill
+1 (555) 123-4567:Pixel 10 Pro XL (Android 17.0) — autofill is broken
✅ Paste
+15551234567:❌ Browser autofill
+15551234567:On Android, autofill reports
selection: { start: 0, end: 0 }while the text length is 12.Steps to reproduce
npm cinpm startReact Native Version
0.86.0
Affected Platforms
Runtime - Android
Output of
npx @react-native-community/cli infoStacktrace or Logs
MANDATORY Reproducer
https://github.com/nsbarsukov/react-native-android-autofill-bug
Screenshots and Videos
bug-demo.mov