react-native-avoid-softinput icon indicating copy to clipboard operation
react-native-avoid-softinput copied to clipboard

Autoscroll on input field focus on android 15 is over-scrolling

Open parasrvlife opened this issue 3 months ago • 1 comments

Environment

Library version: 7.0.2 OS version: Android 15

Affected platforms

  • [x] Android
  • [ ] iOS

Current behavior

On Android 15, the auto-scroll overshoots when focusing on an input field. Based on my research, this issue is related to the new Edge-to-Edge UI enforcement introduced in Android 15.

Android 14 and older works find.

Expected behavior

On Android 15, the auto-scroll works same as Android 14 without over-scrolling.

As a temporary workaround, I’m currently doing:


import { useSafeAreaInsets } from 'react-native-safe-area-context';

...
const insets = useSafeAreaInsets();
return (
    <AvoidSoftInputView
      style={styles.container}
      avoidOffset={isAndroid15Plus && -insets.top}
    >
   ...
   </AvoidSoftInputView>
)

this fixes the problem but needs a permanent fix for this

Also I have added react-native-edge-to-edge, but that also didn't fix this.

https://github.com/user-attachments/assets/e40bb794-f54f-4299-a6ee-e11e08123dbb

Reproduction

None

parasrvlife avatar Sep 01 '25 04:09 parasrvlife