mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 09:10:08 +00:00
prevent double grab focus action
This commit is contained in:
parent
574f9ad55a
commit
9843ed131c
@ -38,10 +38,10 @@ impl Name {
|
||||
// Actions
|
||||
|
||||
/// Change visibility status
|
||||
/// * grab focus on `is_visible`
|
||||
/// * grab focus on `is_visible` is `true`
|
||||
pub fn set_visible(&self, is_visible: bool) {
|
||||
self.entry.set_visible(is_visible);
|
||||
if is_visible {
|
||||
if is_visible && self.entry.focus_child().is_none() {
|
||||
self.entry.grab_focus();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user