diff --git a/src/client/JoinLobbyModal.ts b/src/client/JoinLobbyModal.ts index 4bea53d43..65d65bfe5 100644 --- a/src/client/JoinLobbyModal.ts +++ b/src/client/JoinLobbyModal.ts @@ -369,6 +369,11 @@ export class JoinLobbyModal extends BaseModal { ); } + public confirmBeforeClose(): boolean { + if (!this.currentLobbyId) return true; + return confirm(translateText("host_modal.leave_confirmation")); + } + protected onClose(): void { this.clearCountdownTimer(); this.stopLobbyUpdates();