[MM-54742] Force secure keyboard entry off when window loses focus and when servers switch (#2869)

* [MM-54742] Force secure keyboard entry off when window loses focus and when servers switch

* Fix for when window is not focused, added tests
This commit is contained in:
Devin Binnie
2023-10-10 10:47:13 -04:00
committed by GitHub
parent 9aec7db821
commit 36daa3d67e
5 changed files with 64 additions and 5 deletions

View File

@@ -16,6 +16,7 @@ import {
SHOW_NEW_SERVER_MODAL,
SHOW_REMOVE_SERVER_MODAL,
SWITCH_SERVER,
TOGGLE_SECURE_INPUT,
UPDATE_SERVER_ORDER,
UPDATE_SHORTCUT_MENU,
UPDATE_TAB_ORDER,
@@ -87,6 +88,7 @@ export class ServerViewState {
ServerManager.getServerLog(serverId, 'WindowManager').error('Cannot find server in config');
return;
}
ipcMain.emit(TOGGLE_SECURE_INPUT, null, false);
this.currentServerId = serverId;
const nextView = ServerManager.getLastActiveTabForServer(serverId);
if (waitForViewToExist) {