Dismiss git commit modal when it's out of focus (#25518)
Release Notes: - Fix git commit modal not being dismissed when pressing esc key or clicking outside the modal
This commit is contained in:
parent
3ee4edc404
commit
10fef92eea
1 changed files with 7 additions and 0 deletions
|
@ -149,6 +149,13 @@ impl CommitModal {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let focus_handle = commit_editor.focus_handle(cx);
|
||||||
|
|
||||||
|
cx.on_focus_out(&focus_handle, window, |this, _, window, cx| {
|
||||||
|
cx.emit(DismissEvent);
|
||||||
|
})
|
||||||
|
.detach();
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
git_panel,
|
git_panel,
|
||||||
commit_editor,
|
commit_editor,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue