From 37c370266ee4b56a22504eda5d4ae104e36dbf4b Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 23 Nov 2026 14:58:05 +0100 Subject: [PATCH] Preserve last active signature tab in popup Added `_lastSavedSignatureTab` to store the last active signature tab. Updated `OpenSignaturePopup` to restore the last tab if a signature exists. Updated signature submission logic to save the current tab before closing the popup. --- .../Components/Pages/ReceiverPage.razor | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EnvelopeGenerator.Server/EnvelopeGenerator.Server/Components/Pages/ReceiverPage.razor b/EnvelopeGenerator.Server/EnvelopeGenerator.Server/Components/Pages/ReceiverPage.razor index b6f7afce..917efd73 100644 --- a/EnvelopeGenerator.Server/EnvelopeGenerator.Server/Components/Pages/ReceiverPage.razor +++ b/EnvelopeGenerator.Server/EnvelopeGenerator.Server/Components/Pages/ReceiverPage.razor @@ -482,6 +482,7 @@ bool _signaturePopupVisible = false; string? _popupValidationMessage; string _activeSignatureTab = SignatureTabDraw; + string _lastSavedSignatureTab = SignatureTabDraw; string _typedSignatureText = string.Empty; string _typedSignatureFont = "'Brush Script MT', cursive"; string _signerFullName = string.Empty; @@ -684,7 +685,7 @@ // ----- Signature popup handlers ----- void OpenSignaturePopup() { - _activeSignatureTab = SignatureTabDraw; + _activeSignatureTab = _capturedSignature is null ? SignatureTabDraw : _lastSavedSignatureTab; _signaturePopupVisible = true; _popupValidationMessage = null; } @@ -796,6 +797,7 @@ Place = _signaturePlace.Trim(), }; _capturedSignatureDateText = DateTime.Now.ToString("dd.MM.yyyy"); + _lastSavedSignatureTab = _activeSignatureTab; _signaturePopupVisible = false; await InvokeAsync(StateHasChanged); }