-
Notifications
You must be signed in to change notification settings - Fork 492
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
ScrollView children behave differently on Web and Android #1131
Comments
We've tried to move from block to flex for this div previously, and IIRC, it caused a bunch of problems. Sorry, I wish I remembered more of the details. It's been a couple of years. I'm not opposed to this change, but it will require some significant testing to make sure it doesn't break things. |
I don't remember the details either, just that it was left that way internationally. |
Yeah, I agree it makes sense to make this change in 2.0 rc. |
This is a little more tricky than I initially suspected - Applying display: flex to the div causes some controls to shrink. This can be worked around by wrapping the children in another div (much like React Native does). I'm playing around with this and it looks promising, but will have to do a little more testing before posting a PR. An additional piece that I noticed - the vertical attribute doesn't work on any platform beyond web. |
@berickson1, what's the latest on this one? |
I ran into a few issues with this initially regarding switching the wrapper to block from flex and then lost the branch when transitioning to a new machine. I worked around this in my own project by adding a wrapper view inside the scrollview and I haven't had a chance to pick this back up for RX |
@bericson1 @erictraut -- I've been noticing this problem myself recently, and in general it feels like the default of What should we do here? I'd be happy to do the implementation if I get a little bit more precision on what you recommend here. |
On Android, ScrollView children grow (as seen in Button in screenshot)
On Web, ScrollView children don't grow
This can be fixed by switching the style on the ScrollView div from
block
toflex
. I don't see any immediate issues making this change - but posting here before raising a PR in case anyone has behaviour that relies on existing ScrollView behaviour.See the button below in the screenshot
The text was updated successfully, but these errors were encountered: