Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatlist scrolls to the opposite direction when content height changes #24011

Closed
pinarol opened this issue Mar 18, 2019 · 13 comments
Closed

Flatlist scrolls to the opposite direction when content height changes #24011

pinarol opened this issue Mar 18, 2019 · 13 comments
Labels
Bug Component: FlatList Priority: Mid Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@pinarol
Copy link

pinarol commented Mar 18, 2019

🐛 Bug Report

FlatList sometimes produces a scrolling glitch when we change the content. That means, scrolling goes to the opposite direction for a bit. We already had made an extra development to make scroll position follow the cursor so it is coming back to visible area. But still the first movement to the opposite direction is sth we don't directly do and it looks a bit odd.

This sometimes happens when we add new content, scrolling position goes down unnecessarily:

split-glitch-fast1

In slow motion:

split-glitch-slow1

This sometimes happen when we merge the content so the content height decreases, as noticed here scroll position goes down a bit when the merge happens

merge-glitch1

Some analysis:

when I comment out the method

- (CGPoint)calculateOffsetForContentSize:(CGSize)newContentSize
everything works fine, so maybe just being able to turn off the calculateOffsetForContentSize method call would solve this, but any other solutions and workarounds are also very appreciated.

To Reproduce

This repo can be checked out https://github.com/wordpress-mobile/gutenberg-mobile

  • cd to repo
  • yarn install
  • yarn start
  • yarn ios

to open the example app and try adding merging text inputs by erase/return buttons at some point it'll start to glitch.

Expected Behavior

Here is the expected behavior, no scrolling to the opposite side:

split-glitch-normal1

Code Example

You can refer to the repo https://github.com/wordpress-mobile/gutenberg-mobile and follow "To Reproduce" steps. Here's the exact place of the FlatList https://github.com/wordpress-mobile/gutenberg-mobile/blob/5f1a641637a8b26a8354982c8b2b61b39c1f6acb/src/components/keyboard-aware-flat-list.ios.js#L63

Environment

React Native Environment Info:
System:
OS: macOS 10.14.3
CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
Memory: 427.82 MB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.12.0 - ~/.nvm/versions/node/v10.12.0/bin/node
Yarn: 1.10.1 - ~/.nvm/versions/node/v10.12.0/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.12.0/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 23, 26, 27, 28
Build Tools: 26.0.2, 26.0.3, 27.0.3, 28.0.3
System Images: android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.0 => 0.59.0
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-create-library: 3.1.2
react-native-git-upgrade: 0.2.7

@Kacppian
Copy link

Is anybody working on this? I'd like to take a shot at this issue.

@stale
Copy link

stale bot commented Aug 2, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 2, 2019
@pinarol
Copy link
Author

pinarol commented Aug 2, 2019

Issue is not fixed yet

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 2, 2019
@stale
Copy link

stale bot commented Oct 31, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Oct 31, 2019
@pinarol
Copy link
Author

pinarol commented Oct 31, 2019

Issue is not fixed yet

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Oct 31, 2019
@stale
Copy link

stale bot commented Jan 30, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 30, 2020
@pinarol
Copy link
Author

pinarol commented Jan 30, 2020

Issue is not fixed yet

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 30, 2020
@stale
Copy link

stale bot commented Apr 29, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Apr 29, 2020
@pinarol
Copy link
Author

pinarol commented Apr 29, 2020

Issue is not fixed yet

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Apr 29, 2020
@taranda
Copy link

taranda commented Jun 23, 2020

I am experiencing a similar issue.

@pinarol
Copy link
Author

pinarol commented Jun 23, 2020

Issue is not fixed yet

@stale
Copy link

stale bot commented Oct 4, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Oct 4, 2020
@stale
Copy link

stale bot commented Oct 12, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Component: FlatList Priority: Mid Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

6 participants