Scroll Viewer Not Appearing Until Clicked

Hello! I have a ScrollViewer on an adt in Texture Mode and on alpha 47 it works just fine. After upgrading to alpha 65, the barColor (which is supposed to be blue) doesn’t show up until I click around in the scroll bar area a few times, and then it appears and seems to work just fine. So, at first glance, it doesn’t even look like a scroll panel!

Any ideas?

Here’s a playground ( Scroll Viewer Example | Babylon.js Playground (babylonjs.com)) that shows a really crudely tweaked example from the docs where I take a scroll viewer and put it on an adt in texture mode and then make the child container a lot bigger than the scroll viewer. I can strangely click inside the bar area to make it go downwards, but the bar doesn’t appear initially - and in this case, doesn’t appear at all. In my app, I’m able to eventually get the bar to appear with enough clicking, but I’m hoping there is some overlap between these issues to help get to the bottom of it.

1 Like

@DarraghBurke , @carolhmj can one of you have a quick look ?

Any luck @DarraghBurke ? This one is pretty much blocking our ability to update! :flushed:

Hey Gabriel, apologies that things are going slower than normal, I have been working through some issues that were backlogged from over the holidays. I have taken an initial look at this but haven’t identified the cause yet. I’m going to make it my first priority to resolve tomorrow, so you can most likely expect a fix by then :slight_smile:

1 Like

Okay, a quick workaround to your playground issue:
scene.onAfterRenderObservable.addOnce(() => sv.verticalBar._markAsDirty());
This makes the scrollbar visible on the second frame. If you call _markAsDirty() before the first render, however, it remains invisible. I’m looking into that now.

Took me many hours of searching, but I have found the cause and opened a PR to revert it :slight_smile:

Not sure yet if this is the best solution, we will take a look at alternatives tomorrow.

Sorry for the long process!

[GUI] Fix scrollbar in ScrollViewer clipping incorrectly by darraghjburke · Pull Request #11721 · BabylonJS/Babylon.js (github.com)

4 Likes

I appreciate the attention to this @DarraghBurke !!

3 Likes

Thank you for reporting the issue! Fix is merged, let us know if you catch anything else!

2 Likes