[Bug] element.focus is not a function
See original GitHub issueAfter select result I got many errors “Microsoft.JSInterop.JSException: element.focus is not a function” After that component stop working.
Blazor Server side.
<BlazoredTypeahead TItem="string" TValue="string" Value="SelectedFilm" ValueExpression="@(() => SelectedFilm)" ValueChanged="@(e => Console.WriteLine(e))" placeholder="Search..." Debounce="1000" SearchMethod="SearchFilms"> <SelectedTemplate> @context </SelectedTemplate> <ResultTemplate> @context </ResultTemplate> <NotFoundTemplate> Sorry, there weren't any search results. </NotFoundTemplate> <FooterTemplate> <button>Show more</button> </FooterTemplate> </BlazoredTypeahead>
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Javascript: Focus is not a function - html
Your Forename variable is not holding a reference to a DOM element. It is referencing the .value of that element. The same is...
Read more >Javascript: Focus is not a function
I'm writing a registration form and am trying to sort out some validation. I got this same problem when my validate button was...
Read more >HTMLElement: focus() method - Web APIs | MDN
The HTMLElement.focus() method sets focus on the specified element, if it can be focused. The focused element is the element that will ...
Read more >Focusing: focus/blur
Most elements do not support focus by default. Use tabindex to make anything focusable. The current focused element is available as document.
Read more >Uncaught TypeError: this.nextSibling.focus is not a function
Hello, I've tried to focus an input element when I click on the span element (with " Username: " label) using this.nextSibling property...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the info @arivera12. I’m working on a very big update for Blazored Modal which should be out this week. Once I’m done with that I’m going to be working on the Typeahead.
Thanks @needhelp33, I understand what you mean now. I’ve just realised that my issue was actually related to the fact that I was using the ValueChanged event instead of @bind-Value as per #124 and I hadn’t followed @osheab87’s advise here: https://github.com/Blazored/Typeahead/issues/124#issuecomment-632820208