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:
@@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user