diff --git a/crates/egui/src/response.rs b/crates/egui/src/response.rs index 027938fb18c..bc252052ae4 100644 --- a/crates/egui/src/response.rs +++ b/crates/egui/src/response.rs @@ -770,9 +770,8 @@ impl Response { /// ``` /// /// See also: [`Ui::menu_button`] and [`Ui::close_menu`]. - pub fn context_menu(self, add_contents: impl FnOnce(&mut Ui)) -> Self { - menu::context_menu(&self, add_contents); - self + pub fn context_menu(&self, add_contents: impl FnOnce(&mut Ui)) -> Option> { + menu::context_menu(self, add_contents) } }