pixijs / ui

Commonly used UI components for PixiJS

Home Page:https://pixijs.io/ui/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ScrollBox glitches elements on scroll if they are less then its height (macOS)

SergeiSomin opened this issue · comments

commented

Expected Behavior

Elements are either scrolled down or not scrollable at all in case elements height is less the ScrollBox height.

Current Behavior

bug

Steps to Reproduce

  1. Create ScrollBox.
  2. Set its height.
  3. Add elements and set their combined height to be less then ScrollBox height.
  4. 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

Thank you, @SergeiSomin. This is related to

protected onMouseScroll(event: WheelEvent): void

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?

commented

Yeah, got it, thanks, I will do PR