Skip to content

KeyboardAwareScrollView doesn't animate scroll position towards the end of the scrollable content #1483

@fbeccaceci

Description

@fbeccaceci
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-06-02.at.17.04.18.mov

As the title says KeyboardAwareScrollView usually animated the scroll position when the focused input changes, typical use case is a long form. As it is clearly visible from the video attached the scrollview snaps into the new offset when reaching the end of the scrollable content.

This issue seems to be reproducing on iOS only, on Android i have tested the same code and it always animates.

Code snippet

import { useRef } from "react";
import { TextInput, View } from "react-native";
import { KeyboardAwareScrollView } from "react-native-keyboard-controller";
import { StyleSheet } from "react-native-unistyles";

const FIELDS_NUM = 20;
const FIELDS = new Array(FIELDS_NUM).fill(0).map((_, i) => i);

export default function KeyboardAwareScrollViewExperimentScreen() {
  const inputRefs = useRef<(TextInput | null)[]>([]);

  return (
    <View style={styles.root}>
      <KeyboardAwareScrollView
        style={styles.scrollView}
        contentContainerStyle={styles.scrollContent}
        keyboardShouldPersistTaps="handled"
        showsVerticalScrollIndicator={false}
        bottomOffset={60}
      >
        {FIELDS.map((i) => (
          <TextInput
            key={i}
            style={styles.input}
            placeholder={"Input N." + i}
            ref={(r) => {
              inputRefs.current[i] = r;
            }}
            returnKeyType="next"
            submitBehavior="submit"
            onSubmitEditing={() => {
              if (i === inputRefs.current.length - 1) return;

              const nextInputRef = inputRefs.current[i + 1];
              if (nextInputRef) {
                nextInputRef.focus();
              }
            }}
          />
        ))}
      </KeyboardAwareScrollView>
    </View>
  );
}

const styles = StyleSheet.create((theme, rt) => ({
  root: {
    flex: 1,
  },

  scrollView: {
    flex: 1,
  },

  input: {
    borderBottomColor: theme.colors.border.secondary,
    borderBottomWidth: 1,
    paddingVertical: 20,
  },

  scrollContent: {
    paddingHorizontal: 24,
    gap: 28,

    paddingTop: rt.insets.top,
    paddingBottom: rt.insets.bottom,
  },

  footer: {
    paddingHorizontal: 24,
    paddingTop: 12,
  },
}));

Expected behavior
The scroll animation is performed on all text inputs

Smartphone (please complete the following information):

  • Desktop OS: MacOS 26.5
  • Device: iPhone Simulator
  • OS: iOS 26.5
  • RN version: 0.83.2
  • RN architecture: fabric
  • JS engine: Hermes
  • Library version: 1.21.9

Metadata

Metadata

Assignees

Labels

KeyboardAwareScrollView 📜Anything related to KeyboardAwareScrollView componentrepro providedIssue contains reproduction repository/code🍎 iOSiOS specific

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions