From 638c6f3291feffa44da9ceb290c8ed72749f0b2a Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 1 Jun 2026 02:56:51 +0200 Subject: [PATCH] Refactor signature popup handling in ReportViewer Simplified the `OpenSignaturePopupAsync` method by converting it to a synchronous `void` method and removing unnecessary asynchronous calls. Introduced a new `OnPopupShownAsync` method to handle popup initialization logic. Updated the `` component to include the `Shown="OnPopupShownAsync"` attribute and re-added the `CloseOnOutsideClick="false"` attribute. Improved the logic for opening the signature popup by setting the active tab and resetting validation messages inline. Enhanced the `OnAfterRenderAsync` lifecycle method to include additional checks for `Report`, annotations, and signature state before triggering JavaScript runtime calls. These changes improve the popup's behavior and overall state management. --- .../Pages/ReportViewer.razor | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/EnvelopeGenerator.ReceiverUI/Pages/ReportViewer.razor b/EnvelopeGenerator.ReceiverUI/Pages/ReportViewer.razor index f7c68fce..5446b1ec 100644 --- a/EnvelopeGenerator.ReceiverUI/Pages/ReportViewer.razor +++ b/EnvelopeGenerator.ReceiverUI/Pages/ReportViewer.razor @@ -96,7 +96,8 @@ Width="620px" ShowFooter="true" CloseOnEscape="false" ShowCloseButton="false" -CloseOnOutsideClick="false"> +CloseOnOutsideClick="false" +Shown="OnPopupShownAsync">