Fix scrolling for nested views#6111
Merged
Wide-Cat merged 1 commit intoMeteorDevelopment:masterfrom Feb 5, 2026
Merged
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.
Type of change
Description
Context / Scenario
There are 2 views, one nested inside the other, and both have
scrollOnlyWhenMouseOver = false. The user attempts to scroll while not hovering directly over any of the views.Changes
Old logic:
The outer view took priority.
propagateEventsfor the inner view returnedfalsebecause the check(mouseOver && isWidgetInView(widget)) || widget.isFocused()failed (sincemouseOverwas false).Result:
onMouseScrolledwas never called for the inner view, so only the outer view scrolled. (See vid1)New logic:
The inner view now takes priority.
propagateEventsnow checks if the widget is aWView. If so, it bypasses the strictmouseOvercheck and only validatesisWidgetInView(widget)(checking for intersection to prevent scrolling invisible/off-screen views).onMouseScrolled. It returnstrue(consuming the event) only if it actually scrolled.false, allowing the outer view to handle the scroll event. (See vid2)Additional Fixes
In
FontFaceSettingScreen, I changed the view's max height to be smaller than the window's view max height. This prevents unintended double scrolling in this specific case. (See vid3)I have also removed
boolean handlePressedfromWView, since it could be replace withfocused. (Epic memory save moment)Related issues
fih 🐟
How Has This Been Tested?
Old view-in-view logic: vid1
Fixed view-in-view logic: vid2 <- this is just the view logic showcased
New single scroll font selection: vid3 <- this is actually how it looks ingame (without double scroll)
Checklist: