Close dialog on escape
This commit is contained in:
parent
197398fe4e
commit
9759f3626f
1 changed files with 4 additions and 0 deletions
|
|
@ -429,6 +429,10 @@ impl Application for App {
|
|||
Command::none()
|
||||
}
|
||||
|
||||
fn on_escape(&mut self) -> Command<Message> {
|
||||
self.update(Message::Cancel)
|
||||
}
|
||||
|
||||
/// Handle application events here.
|
||||
fn update(&mut self, message: Message) -> Command<Message> {
|
||||
match message {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue