fix(text_input): conflicts with keyboard focus navigation
This commit is contained in:
parent
cb682be3c8
commit
ae5bb40d6e
1 changed files with 4 additions and 9 deletions
|
|
@ -647,14 +647,10 @@ where
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if !state
|
if let Some(f) = state.is_focused.as_ref() {
|
||||||
.is_focused
|
if f.updated_at != LAST_FOCUS_UPDATE.with(|f| f.get()) {
|
||||||
.as_ref()
|
state.unfocus();
|
||||||
.map(|f| f.updated_at == LAST_FOCUS_UPDATE.with(|f| f.get()))
|
}
|
||||||
.unwrap_or_default()
|
|
||||||
{
|
|
||||||
state.unfocus();
|
|
||||||
// state.is_read_only = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self.is_read_only = state.is_read_only;
|
self.is_read_only = state.is_read_only;
|
||||||
|
|
@ -1787,7 +1783,6 @@ pub fn update<'a, Message: Clone + 'static>(
|
||||||
// Or to connect the text input to a button.
|
// Or to connect the text input to a button.
|
||||||
shell.publish(on_tab.clone());
|
shell.publish(on_tab.clone());
|
||||||
} else {
|
} else {
|
||||||
state.unfocus();
|
|
||||||
state.is_read_only = true;
|
state.is_read_only = true;
|
||||||
|
|
||||||
if let Some(on_unfocus) = on_unfocus {
|
if let Some(on_unfocus) = on_unfocus {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue