Skip to content

Add BlurAsync API for ElementReference#67631

Open
Yuvan111 wants to merge 4 commits into
dotnet:mainfrom
Yuvan111:blur-28127-elemref
Open

Add BlurAsync API for ElementReference#67631
Yuvan111 wants to merge 4 commits into
dotnet:mainfrom
Yuvan111:blur-28127-elemref

Conversation

@Yuvan111

@Yuvan111 Yuvan111 commented Jul 7, 2026

Copy link
Copy Markdown

Add BlurAsync API for ElementReference

Description

The BlurAsync extension method to ElementReference to provide a built-in way to remove focus from an element, complementing the existing FocusAsync API. Currently, developers must rely on custom JavaScript interop to invoke element.blur() for common scenarios such as removing focus from an input after pressing Enter, dismissing virtual keyboards, or implementing custom focus management. The new API offers a simple, discoverable, and consistent developer experience aligned with the existing focus-related APIs in Blazor.

API Type Summary
BlurAsync(this ElementReference elementReference) ValueTask Removes focus from the specified element referenced by ElementReference.

Fixes #28127

@Yuvan111 Yuvan111 requested a review from a team as a code owner July 7, 2026 10:40
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Jul 7, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Thanks for your PR, @Yuvan111. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add FocusOutAsync method to ElementReference in Blazor .NET 5 server side

1 participant