Fix bug in Response::clicked_elsewhere

Fixes https://github.com/emilk/egui/issues/205
This commit is contained in:
Emil Ernerfeldt 2021-03-08 22:22:44 +01:00
parent 8f3a25d749
commit 2428763756

View file

@ -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?