ScrollBox glitches elements on scroll if they are less then its height (macOS)
SergeiSomin opened this issue · comments
Barkas commented
Expected Behavior
Elements are either scrolled down or not scrollable at all in case elements height is less the ScrollBox height.
Current Behavior
Steps to Reproduce
- Create ScrollBox.
- Set its height.
- Add elements and set their combined height to be less then ScrollBox height.
- Scroll in one direction
Here is codesandbox with reproduction:
https://codesandbox.io/s/funny-rgb-y4p46j?file=/src/index.js
Environment
- version: pixijs: 7.3.1, @pixi/ui: 0.9.1
- Browser & Version: Version 118.0.5993.117 (Official Build) (x86_64)
- OS & Version: macOS 13.5 (22G74)
- Running Example: url
Dmytro Soldatov commented
Thank you, @SergeiSomin. This is related to
Line 490 in b3b2fa6
I think it would be enough just to add there a check for the size of the inner view size and skip scrolling if if is less than scroll box size. Do you want to make a PR?
Barkas commented
Yeah, got it, thanks, I will do PR