Skip to content

Fix scroll area not consuming scroll events#7904

Merged
lucasmerlin merged 1 commit intomainfrom
lucas/fix-scroll-area-in-scroll-area
Feb 17, 2026
Merged

Fix scroll area not consuming scroll events#7904
lucasmerlin merged 1 commit intomainfrom
lucas/fix-scroll-area-in-scroll-area

Conversation

@lucasmerlin
Copy link
Collaborator

This fixes scrolling in a nested scroll area also scrolling the outer scroll area

Screen.Recording.2026-02-13.at.23.00.30.mov

@github-actions
Copy link

github-actions bot commented Feb 13, 2026

Preview available at https://egui-pr-preview.github.io/pr/7904-lucasfix-scroll-area-in-scroll-area
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

View snapshot changes at kitdiff

@lucasmerlin lucasmerlin added bug Something is broken egui labels Feb 13, 2026
Comment on lines 1200 to 1204
if always_scroll_enabled_direction {
input.smooth_scroll_delta()[0] = 0.0;
input.smooth_scroll_delta()[1] = 0.0;
input.smooth_scroll_delta = Vec2::ZERO;
} else {
input.smooth_scroll_delta()[d] = 0.0;
input.smooth_scroll_delta[d] = 0.0;
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh, how did the old code pass both rustc and clippy 😱

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently this is a known thing: rust-lang/rust-clippy#7117

@lucasmerlin lucasmerlin merged commit 08f3fd2 into main Feb 17, 2026
36 of 49 checks passed
@lucasmerlin lucasmerlin deleted the lucas/fix-scroll-area-in-scroll-area branch February 17, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is broken egui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments