after connections modal closes, refocus

This commit is contained in:
sawka
2023-04-03 22:21:57 -07:00
parent 501e2ac76c
commit a8eafca91b
+12
View File
@@ -2275,11 +2275,15 @@ class RemotesModalModel {
}
closeModal() : void {
if (!this.openState.get()) {
return;
}
mobx.action(() => {
this.openState.set(false);
this.selectedRemoteId.set(null);
this.remoteEdit.set(null);
})();
setTimeout(() => GlobalModel.refocus(), 10);
}
disposeTerm() : void {
@@ -2448,6 +2452,14 @@ class Model {
getApi().reloadWindow();
}
refocus() { // givefocus() give back focus to cmd or input
let activeScreen = this.getActiveScreen();
if (screen == null) {
return;
}
activeScreen.giveFocus();
}
getHasClientStop() : boolean {
if (this.clientData.get() == null) {
return true;