mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
prevent double grab focus action
This commit is contained in:
parent
574f9ad55a
commit
9843ed131c
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue