Skip to content

Unable to cancel the "prompt for password" #1236

@parintorn0

Description

@parintorn0

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions