diff --git a/crates/egui/src/containers/scroll_area.rs b/crates/egui/src/containers/scroll_area.rs index c448269f..700c2040 100644 --- a/crates/egui/src/containers/scroll_area.rs +++ b/crates/egui/src/containers/scroll_area.rs @@ -493,6 +493,7 @@ impl ScrollArea { } = self; let ctx = ui.ctx().clone(); + let scrolling_enabled = scrolling_enabled && ui.is_enabled(); let id_source = id_source.unwrap_or_else(|| Id::new("scroll_area")); let id = ui.make_persistent_id(id_source); diff --git a/crates/egui_plot/src/lib.rs b/crates/egui_plot/src/lib.rs index 2e31f831..cc721bd9 100644 --- a/crates/egui_plot/src/lib.rs +++ b/crates/egui_plot/src/lib.rs @@ -766,6 +766,11 @@ impl Plot { sense, } = self; + // Disable interaction if ui is disabled. + let allow_zoom = allow_zoom.and(ui.is_enabled()); + let allow_drag = allow_drag.and(ui.is_enabled()); + let allow_scroll = allow_scroll.and(ui.is_enabled()); + // Determine position of widget. let pos = ui.available_rect_before_wrap().min; // Determine size of widget.