Skip to content

[ScrollView] scroll to Top leaves unnecessary white space #16114

Description

@ahishek

I'm trying to scroll to the top of my scrollView on the click of an item at it's bottom. But what's happening is that, on doing this, it leaves random white space at the top of my scrollview. Basically, pushes my other content down.

`<ScrollView
ref={(c) => {
this.content = c;
}}
alwaysBounceVertical={false}
bounces={false}
automaticallyAdjustContentInsets={false}
onScroll={this.handleScroll}
>
{....content}

// On bottom component click,
this.content.scrollTo({ y: 0, x: 0, animated: true });
`

Here are the screen shots -

Expected Behaviour

screen shot 2017-09-27 at 3 55 09 pm

Actual Behaviour

screen shot 2017-09-27 at 3 54 28 pm

screen shot 2017-09-27 at 3 54 54 pm

Environment

Environment:
OS: macOS Sierra 10.12.6
Xcode: 9.0 (9A235)

Packages: (installed)
react-native: 0.45.1
react: 16.0.0-alpha.12

Target Platform: iOS (11)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    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