fix: a credential or host-key prompt takes Enter and Escape from the modals underneath
Every modal read Enter/Escape globally, so a prompt that popped up over a dialog, the palette, Quick Connect or an SFTP dialog could be answered and the modal underneath confirmed or dismissed by the same key press. All modals except the prompts now read those keys through chrome::modal_key, which yields while a prompt is on screen.
This commit is contained in:
@@ -266,7 +266,7 @@ impl Recordings {
|
||||
let Some(r) = &self.confirm_delete else {
|
||||
return;
|
||||
};
|
||||
let (mut yes, mut no) = (false, ctx.input(|i| i.key_pressed(Key::Escape)));
|
||||
let (mut yes, mut no) = (false, crate::chrome::modal_key(ctx, Key::Escape));
|
||||
let name = if r.title.is_empty() { r.id.clone() } else { r.title.clone() };
|
||||
crate::chrome::modal(ctx, "rec-delete", 380.0, |ui| {
|
||||
ui.label(RichText::new("Delete recording?").font(theme::semibold(15.0)));
|
||||
|
||||
Reference in New Issue
Block a user