From 242876375685b4cbf061b17ecb41b5b936bff197 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Mon, 8 Mar 2021 22:22:44 +0100 Subject: [PATCH] Fix bug in Response::clicked_elsewhere Fixes https://github.com/emilk/egui/issues/205 --- egui/src/response.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/egui/src/response.rs b/egui/src/response.rs index 78687cc55..aefd3979f 100644 --- a/egui/src/response.rs +++ b/egui/src/response.rs @@ -135,7 +135,7 @@ impl Response { /// `true` if there was a click *outside* this widget this frame. pub fn clicked_elsewhere(&self) -> bool { - !self.hovered && self.ctx.input().pointer.any_pressed() + !self.clicked() && self.ctx.input().pointer.any_click() } /// Was the widget enabled?