Skip to content

[Android] [adjustResize] Keyboard pushes absolute-positioned dynamic-height component off screen #6785

@jayesbe

Description

@jayesbe

I created a ticket related to the ExNavigator here expo/ex-navigator#105

However I believe this is a core issue.

Currently I am using RN 0.22.2 (on Android)

Basically this is my View

<View style={{flex: 1}}>
      <View style={[position: 'absolute', top: 0, left: 0, right: 0, height: 50]}>

      </View>
      <View style={[position: 'absolute', bottom: 0, left: 0, right: 0, height: 50]}>
          <TextInput />
     </View>
<View>

This is basically a chat window with an input field positioned at the bottom of the screen and a header positioned at the top of the screen.

When I first open / run the app, Upon focus of the TextInput, the keyboard appears and the View component positioned at the top is pushed off the page.

I spent a day yesterday figuring out why but in the end I used keyboardDidShow and keyboardDidHide to offset the position of the element so it kind of works.

However today I noticed something different. By chance I minimized the App. I didn't close it. I opened it back up and now the View component that should be positioned at the top was now in the middle. (My offset was calculated to ~270)

So I once again removed the offset handling changes and positioned it statically at the top with top: 0.
I then ran the app again by closing and reopening, as expected the View component was once again pushed off the screen when the keyboard appeared.

I minimized the app, then brought it back up. This time when the keyboard appeared, the View component stayed at the top! This is what I am expecting when you open the app the first time, however it only works after minimizing it first.

Definitely seems like a bug to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPlatform: AndroidAndroid applications.Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions