@@ -81,9 +81,11 @@ impl View for SearchView {
|
||||
}
|
||||
|
||||
fn on_event(&mut self, event: Event) -> EventResult {
|
||||
if event == Event::Key(Key::Esc) || event == Event::Key(Key::Tab) {
|
||||
if event == Event::Key(Key::Tab) {
|
||||
self.edit_focused = !self.edit_focused;
|
||||
return EventResult::Consumed(None);
|
||||
} else if self.edit_focused && event == Event::Key(Key::Esc) {
|
||||
self.clear();
|
||||
}
|
||||
|
||||
if self.edit_focused {
|
||||
|
||||
Reference in New Issue
Block a user