fix(text_input): only set read only if the text input is editable
This commit is contained in:
parent
91eae67dd5
commit
421e349cb9
1 changed files with 3 additions and 1 deletions
|
|
@ -1531,7 +1531,9 @@ pub fn update<'a, Message: Clone + 'static>(
|
||||||
state.dragging_state = None;
|
state.dragging_state = None;
|
||||||
state.is_pasting = None;
|
state.is_pasting = None;
|
||||||
state.keyboard_modifiers = keyboard::Modifiers::default();
|
state.keyboard_modifiers = keyboard::Modifiers::default();
|
||||||
state.is_read_only = true;
|
if is_editable {
|
||||||
|
state.is_read_only = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Ensure clicks outside emit the toggle edit message.
|
// Ensure clicks outside emit the toggle edit message.
|
||||||
if let Some(on_toggle_edit) = on_toggle_edit {
|
if let Some(on_toggle_edit) = on_toggle_edit {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue