Skip to content

Dropdown menu opened programmatically doesn't close when clicking away #1250

@RobertRiojaAlpa

Description

@RobertRiojaAlpa

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

Describe the bug
When a Dropdown menu is opened programmatically by calling either Show() or Toggle(), the only way to then close the menu is by clicking the DropdownToggle itself or calling Hide() or Toggle(). The menu should also close when clicking anywhere else on the page. This bug is present in the demo as well Blazor Dropdown

To Reproduce
Steps to reproduce the behavior:

  1. Create a Dropdown
  2. Call Show() or Toggle()
  3. Click anywhere else on the page

Expected behavior
The dropdown menu is closed when clicking on the page.

Versions (please complete the following information):

  • .NET 10
  • BlazorBootstrap 3.5.0
  • Blazor Server
  • Blazor Interactive Render Mode Auto
  • Blazor Interactivity Location Global

Desktop (please complete the following information):

  • Windows
  • Chrome
  • Version 145

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions