diff --git a/CHANGELOG.md b/CHANGELOG.md index abe2c1e9..a379d163 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ NOTE: [`eframe`](eframe/CHANGELOG.md), [`egui_web`](egui_web/CHANGELOG.md) and [ * Make labels interactive with `Label::sense(Sense::click())`. * Add `Response::request_focus` and `Response::surrender_focus`. +### Changed 🔧 +* Make `Memrory::has_focus` public (again) + ### Fixed 🐛 * Fix [defocus-bug on touch screens](https://github.com/emilk/egui/issues/288) diff --git a/egui/src/memory.rs b/egui/src/memory.rs index 117b66f3..db80791f 100644 --- a/egui/src/memory.rs +++ b/egui/src/memory.rs @@ -296,7 +296,8 @@ impl Memory { !self.had_focus_last_frame(id) && self.has_focus(id) } - pub(crate) fn has_focus(&self, id: Id) -> bool { + /// Does this widget have keybaord focus? + pub fn has_focus(&self, id: Id) -> bool { self.interaction.focus.id == Some(id) }