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

Content inside scroll view with contentInsetAdjustmentBehavior with incorrect height #23480

Closed
1987cr opened this issue Feb 15, 2019 · 23 comments
Labels
Bug Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@1987cr
Copy link

1987cr commented Feb 15, 2019

🐛 Bug Report

It seems that scroll view doesn't calculate properly the size of its container when contentInsetAdjustmentBehavior is set to automatic

To Reproduce

Refer to this snack:
https://snack.expo.io/r1XhuwVBV

When contentInsetAdjustmentBehavior is set to automatic, the container view get's pushed from the top, but the container maintains the same height, so you have an extra scroll size that hides the bottom text.

screen shot 2019-02-15 at 17 26 01

For reference, same code with contentInsetAdjustmentBehavior set to never:

screen shot 2019-02-15 at 17 25 47

Expected Behavior

Content should just take the remaining space.

screen shot 2019-02-15 at 17 45 06

Code Example

https://snack.expo.io/r1XhuwVBV

Environment

React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: (4) x64 Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz
      Memory: 2.82 GB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.13.0 - /usr/local/bin/node
      Yarn: 1.12.3 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        API Levels: 27, 28
        Build Tools: 27.0.3, 28.0.3
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5014246
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.3 => 16.6.3 
      react-native: 0.58.4 => 0.58.4 
    npmGlobalPackages:
      react-native-cli: 2.0.1
@react-native-bot

This comment has been minimized.

@dani-mp
Copy link

dani-mp commented Feb 21, 2019

We're experiencing it as well and it's quite annoying, does anyone know any workaround?

@zhongwuzw
Copy link
Contributor

@1987cr Hi, thanks for reporting issue, I think it may designated behavior, contentInset adjustment don't change frame of component, which means distance between top text and bottom text is constant.

@dani-mp
Copy link

dani-mp commented May 19, 2019

Hey, @zhongwuzw, thanks for the comment. Could you clarify why do you think that's intended? Note that the intrinsic content size of the component inside is smaller than the remaining space, and that's why I also think it shouldn't add the extra height. If this content were bigger, then the behavior would be ok (and it is, I think).

From a practical point of view, it just doesn't look well. If you have some small content inside a scroll view and then a button you want to pin at the bottom, and you want the scroll view to respect the safe area, you can't get the desired behavior, instead, the button will be pushed down more than it should.

@stale
Copy link

stale bot commented Aug 17, 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 17, 2019
@dani-mp
Copy link

dani-mp commented Aug 17, 2019

👋

Sent with GitHawk

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

stale bot commented Nov 15, 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 Nov 15, 2019
@dani-mp
Copy link

dani-mp commented Nov 15, 2019

👋

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

stale bot commented Feb 13, 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 Feb 13, 2020
@dani-mp
Copy link

dani-mp commented Feb 13, 2020

👋

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

a-eid commented May 5, 2020

having a similar issues.

@dani-mp
Copy link

dani-mp commented Jun 17, 2020

Btw, this also happens when contentInsetAdjustmentBehavior is always.

@stale
Copy link

stale bot commented Sep 20, 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 Sep 20, 2020
@dani-mp
Copy link

dani-mp commented Sep 21, 2020

Still there.

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

stale bot commented Dec 25, 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 Dec 25, 2020
@blueberry6401
Copy link

Hello?

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label May 23, 2021
@burakgormek
Copy link

This is so annoying :(

@dani-mp

This comment was marked as off-topic.

@github-actions
Copy link

github-actions bot commented Mar 4, 2023

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Mar 4, 2023
@dani-mp

This comment was marked as off-topic.

@github-actions github-actions bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Mar 4, 2023
@github-actions
Copy link

github-actions bot commented Sep 3, 2023

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 3, 2023
@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

@ayush-goyal
Copy link

Is there any update on this? Still having this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Platform: iOS iOS applications. 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

10 participants