Add an API to focus on elements #22892
Labels
area-blazor
Includes: Blazor, Razor Components
Done
This issue has been fixed
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
Milestone
A common ask from Blazor users is the ability to perform trivial DOM operations without having to manually write the JavaScript / JSInterop code. Having the ability to focus on DOM elements is one of the more popular ones that we'd like to address.
To solve this, we'd like to introduce
FocusAsync()
as an extension method toElementRef
types. Here's the usage we think would work the best:This would most likely use
JSInterop
for it's implementation, but it would be nice not to have to pass in theIJSRuntime
instance.Related issue with lots of feedback: #17472
The text was updated successfully, but these errors were encountered: