Issue: If a <ScrollView /> is wrapped around a child element that overflows, it won't show a horizontal scroll bar.
Inside the ScrollView control, we create a container around the children - and we compare the size of the container and the size of the children to see if we need to show scrollbars.
For vertical scrolling, the height of the container and children is reported accurately, and if the child height is greater than the container height, we show scrollbars.
However, this isn't the case for horizontal scrollbars - we aren't getting the expected values reported for the width of the element.
This is potentially a styling / flex issue - probably just a bug in how we are applying styles.
There's a few related spots in the code that we could start looking. I kept in some debug logging to check the child width vs container width:
In addition, there's a descriptive comment here:
Issue: If a
<ScrollView />is wrapped around a child element that overflows, it won't show a horizontal scroll bar.Inside the
ScrollViewcontrol, we create a container around the children - and we compare the size of the container and the size of the children to see if we need to show scrollbars.For vertical scrolling, the height of the container and children is reported accurately, and if the child height is greater than the container height, we show scrollbars.
However, this isn't the case for horizontal scrollbars - we aren't getting the expected values reported for the width of the element.
This is potentially a styling /
flexissue - probably just a bug in how we are applying styles.There's a few related spots in the code that we could start looking. I kept in some debug logging to check the child width vs container width:
In addition, there's a descriptive comment here: