diff --git a/src/ui/ssh_prompt.rs b/src/ui/ssh_prompt.rs index c1a5c685..45fa4bd1 100644 --- a/src/ui/ssh_prompt.rs +++ b/src/ui/ssh_prompt.rs @@ -555,6 +555,11 @@ impl Tty7App { div() .absolute() .inset_0() + // This is the one modal that must not be dismissed by a stray + // click — a mis-aimed click would abandon an authentication + // attempt mid-handshake. It gets the scrim, so it reads as + // modal, and Escape stays the only way out. + .bg(crate::ui::presets::scrim_fill(cx)) .flex() .flex_col() .items_center() diff --git a/src/ui/worktree_prompt.rs b/src/ui/worktree_prompt.rs index 0db27ae6..bdf5157d 100644 --- a/src/ui/worktree_prompt.rs +++ b/src/ui/worktree_prompt.rs @@ -209,6 +209,17 @@ impl Tty7App { div() .absolute() .inset_0() + // The backdrop already swallowed every click in the window; it + // just did not look like it did. A scrim says the app is + // waiting, and clicking it backs out — the same gesture the + // palette and the switcher already answer to. + .bg(crate::ui::presets::scrim_fill(cx)) + .on_mouse_down( + gpui::MouseButton::Left, + cx.listener(|this, _: &gpui::MouseDownEvent, window, cx| { + this.cancel_worktree_prompt(window, cx) + }), + ) .flex() .flex_col() .items_center()