Unfocus TextInput when Escape key is pressed
This commit is contained in:
parent
51c22f2426
commit
4ab9992bf8
1 changed files with 5 additions and 0 deletions
|
|
@ -468,6 +468,11 @@ where
|
||||||
self.state.cursor.select_all(&self.value);
|
self.state.cursor.select_all(&self.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
keyboard::KeyCode::Escape => {
|
||||||
|
self.state.is_focused = false;
|
||||||
|
self.state.is_dragging = false;
|
||||||
|
self.state.is_pasting = None;
|
||||||
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
},
|
},
|
||||||
Event::Keyboard(keyboard::Event::KeyReleased {
|
Event::Keyboard(keyboard::Event::KeyReleased {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue