1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

Fix scroll area not consuming scroll events (#7904)

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


https://github.com/user-attachments/assets/ade40b1e-c974-4806-8045-881bea590d4a
This commit is contained in:
Lucas Meurer
2026-02-17 11:08:18 +01:00
committed by GitHub
parent 64a96ef391
commit 08f3fd2dc1

View File

@@ -1198,10 +1198,9 @@ impl Prepared {
// Clear scroll delta so no parent scroll will use it:
ui.input_mut(|input| {
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;
}
});