Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On Uno targets, the horizontal scrollbar never shows up when the rows fit vertically. In that case
IndicatorModeon the horizontal scrollbar staysNoneand the thumb is invisible, so there's no way to scroll horizontally with a mouse on desktop WASM.I dug into Uno's
ScrollViewer, and it turns out it only hooks up its scroll indicator logic (PointerMoved→ScrollingIndicatorStates) for scrollbars it can find by name:HorizontalScrollBar/VerticalScrollBar(or thePART_variants). Our template names the horizontal oneHorizontalScrollBar2, so Uno never picks it up. As long as there's a vertical scrollbar, the visual state still gets driven through that one and everything looks fine. Without vertical overflow, though, nothing ever moves the state out ofNoIndicator.This also explains why the workaround I posted in the issue (temporarily forcing
VerticalScrollBarVisibility = Visible) only worked sometimes. It relied on the vertical scrollbar being materialized at exactly the right moment.The fix sets
IndicatorMode = MouseIndicatoronHorizontalScrollBar2inOnScrollViewerLoaded, for non-Windows targets only. When a vertical scrollbar is present, Uno's visual states still animate the value as before, so that case behaves the same as today.I didn't rename the scrollbar back to
HorizontalScrollBar. That would let Uno'sScrollViewerscroll the content horizontally on its own, which would conflict with how TableView handlesHorizontalOffsetand the frozen row header.I am not sure if this issue occurred only in my development environment, but I confirmed that it works correctly in the modified code.
Related Issue
Closes #421
Type of Change
Checklist
mainbranchScreenshots / Recordings
Additional Notes
#if !WINDOWS, so the WinUI target isn't affected. I only verified that it builds there; I haven't run it.