Skip to content

KeyboardAwareScrollView behavior difference after 1.21.0 #1414

Description

@olitynskyi-mtb

Context

In the 1.21.0 release post, KeyboardAwareScrollView is described as moving from a hidden bottom View to a contentInset-based implementation:

The post explains that before 1.21.0, KeyboardAwareScrollView added a hidden bottom View inside the scroll content, and starting from 1.21.0 it uses contentInset on iOS and ClippingScrollView on Android.

Observed behavior difference

This is not only an internal implementation change. For KeyboardAwareScrollView, it also changes the visual behavior on screens with short content or flex-based layouts.

Before 1.21.0

  • Keyboard space was created by a real spacer view inside the scroll content.
  • Because that spacer participated in layout, the content could visually reflow.
  • In practice, layouts using flex: 1, flexGrow, gap, or justifyContent: "space-between" could compress or redistribute free space as the keyboard opened.

Starting from 1.21.0

  • Keyboard space is added through scroll insets instead of a real child view.
  • The scrollable area grows, but the content layout itself does not reflow in the same way.
  • On screens with content shorter than the viewport, this can look like extra blank scrollable space is added below the content instead of the old visual "compression" behavior.

Why this matters

For some apps, the old KeyboardAwareScrollView behavior was actually desirable. Even though it caused layout participation, it also produced a specific visual result that some form screens relied on.

So from a consumer point of view, this can feel like a behavior change rather than just a performance improvement.

Question

Was this difference in KeyboardAwareScrollView semantics intentional?

More specifically:

  1. Was it expected that KeyboardAwareScrollView would stop visually reflowing short/flex layouts and instead extend only the scrollable area?
  2. Would it make sense to document this more explicitly as a behavioral change for KeyboardAwareScrollView, not only as an internal improvement?
  3. Would you be open to supporting both strategies, for example a spacer mode for the pre-1.21.0 behavior and an inset mode for the layout-free behavior?

Why we are asking

We fully understand the motivation behind the contentInset approach: fewer layout recalculations, more stable animations, and better cross-platform parity.

At the same time, on real screens the previous KeyboardAwareScrollView behavior could be visually preferable, especially for forms with small amounts of content where the layout itself was expected to respond to keyboard space.

Metadata

Metadata

Assignees

Labels

KeyboardAwareScrollView 📜Anything related to KeyboardAwareScrollView componentquestionYou wanted to clarify something about the usage of the library or have a question about something

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions