Skip to content

[Android only][ScrollView] scrollToEnd function scrolls to beginning when in RTL #19909

@megantracy93

Description

@megantracy93

Environment

Environment:
OS: macOS Sierra 10.12.6
Node: 9.3.0
Yarn: 1.3.2
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: Not Found

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.2 => 0.55.2

Description

When the device locale is an RTL language, using a ScrollView's scrollToEnd() function will scroll to the beginning of the scrollview, rather than the end. Notice in all gifs but the Android RTL one, when I click on blue or white boxes, I am scrolled to the purple box.

Platform LTR RTL
Android ezgif com-video-to-gif 6 ezgif com-video-to-gif 7
iOS ezgif com-video-to-gif 8 ezgif com-video-to-gif 9

Reproducible Demo

Snack available here: https://snack.expo.io/HkdupfeGm

Note that on iOS, the Expo app does not seem to support RTL well. I've added in a call to force RTL, but you may need to refresh the code to see RTL behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Author Provided ReproThis issue can be reproduced in Snack or an attached project.Platform: AndroidAndroid applications.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions