blazorbootstrap icon indicating copy to clipboard operation
blazorbootstrap copied to clipboard

Unable to cancel the "prompt for password"

Open parintorn0 opened this issue 11 months ago • 0 comments

NOTE: We do not look at .zip attachments for issue investigation.

Describe the bug When cancel the prompt for password, it keep prompting.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://demos.blazorbootstrap.com/pdf-viewer'
  2. Scroll down to Section 'Prompt for password'
  3. Click on 'Load Password Protected PDF (Prompt for Password)'
  4. Click cancel or 'ESC' key
  5. See error

Expected behavior Unable to cancel the prompt

Versions:

  • .NET Version: .NET 10
  • BlazorBootstrap: 3.5.0
  • Blazor WebAssembly / Server: WebAssembly, Server
  • Blazor Interactive Render Mode: Auto, Server, WebAssembly, None
  • Blazor Interactivity Location: Global, Per page/component

Sample code

@if (showPdfViewer)
{
    <PdfViewer Class="mb-3" Url="@($"{StringConstants.DocsBasePath}/pdf_password_protected.pdf")" PromptForPassword="true" />
}
else
{
    <Button Class="btn btn-secondary mb-3" @onclick="() => showPdfViewer = true">Load Password Protected PDF (Prompt for Password)</Button>
}

@code {
    private bool showPdfViewer = false;
}

Desktop:

  • OS: Linux
  • Browser: Firefox, Chromium
  • Version: 146.0.1, 143.0.7499.169

Smartphone:

  • Device: iPhone
  • OS: iOS26.2
  • Browser: Safari
  • Version 26.2

parintorn0 avatar Jan 03 '26 11:01 parintorn0