Skip to content

KeyboardAwareScrollView example causing some error related to view-flattened thrown by Reanimated #249

Closed
@idrakimuhamad

Description

@idrakimuhamad

Describe the bug

I took the example of the KeyboardAwareScrollView into my app, but recently I notice that its throwing a warning related to view-flattened on Android. On some extend, certain devices will crash when on released build.

The message are like the below:

[Reanimated] The view with tag 1005 gets view-flattened on Android. To disable view-flattening, set `collapsable={false}` on this component.

Repo for reproducing
https://github.com/idrakimuhamad/repro-tamagui

To Reproduce
Steps to reproduce the behaviour:

  1. The first screen contained an input at the bottom and wrapped inside a KeyboardAwareScrollView. Try to focus on it and close.
  2. Press the link "Go to bug screen"
  3. This screen contained a scroll view with a bottom TextInput. This screen doesn't have any keyboard aware view wrapped.
  4. Focus on the input and let the keyboard appear
  5. Without closing the keyboard, press the back button
  6. Once you're back at the previous screen, a warning will appear at the bottom.

On certain devices on release build, the app totally crash. I couldn't replicate with this sample app, but for me to be able to be certain that this is not the caused, I'd require to move over this first.

Expected behavior
No error or warning should be shown.

Screenshots
Screenshot_20230928_000143_reproTamagui

Screenshot_20230928_000151_reproTamagui

Screenshot_20230928_000159_reproTamagui

Smartphone (please complete the following information):

  • RN version: 0.71.8
  • RN architecture: paper
  • Library version: 1.7.0

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions