From adec27a7dd2e4642061cf4434954b9cbc33b7b93 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sat, 10 Oct 2020 07:54:28 +0200 Subject: [PATCH] fix: clip_rect of combo box popup --- egui/src/containers/combo_box.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/egui/src/containers/combo_box.rs b/egui/src/containers/combo_box.rs index da8e12441..62b8ebe54 100644 --- a/egui/src/containers/combo_box.rs +++ b/egui/src/containers/combo_box.rs @@ -50,10 +50,13 @@ pub fn combo_box( } if ui.memory().is_popup_open(popup_id) { + let parent_clip_rect = ui.clip_rect(); + Area::new(popup_id) .order(Order::Foreground) .fixed_pos(button_response.rect.left_bottom()) .show(ui.ctx(), |ui| { + ui.set_clip_rect(parent_clip_rect); // for when the combo-box is in a scroll area. let frame = Frame::popup(ui.style()); let frame_margin = frame.margin; frame.show(ui, |ui| {