mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
make enter key equivalent to go button when location field is focused (#30126)
This commit is contained in:
parent
da64144ff4
commit
2afb7c1975
1 changed files with 4 additions and 0 deletions
|
@ -66,6 +66,10 @@ impl Minibrowser {
|
||||||
if ui.input(|i| i.clone().consume_key(Modifiers::COMMAND, Key::L)) {
|
if ui.input(|i| i.clone().consume_key(Modifiers::COMMAND, Key::L)) {
|
||||||
location_field.request_focus();
|
location_field.request_focus();
|
||||||
}
|
}
|
||||||
|
if location_field.lost_focus() && ui.input(|i| i.clone().key_pressed(Key::Enter)) {
|
||||||
|
event_queue.borrow_mut().push(MinibrowserEvent::Go);
|
||||||
|
location_dirty.set(false);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue