Closed
Description
Describe the bug
An error is thrown:
Error: System.ArgumentException: There is no event handler associated with this event. EventId: '3'. (Parameter 'eventHandlerId')
when an element with focusout handler is removed from the DOM in a blazor wasm app (both 3.1 and 5.0).
To Reproduce
- Clone the https://github.com/Stamo-Gochev/blazor-net5-wasm-focusout repository
- Set the TestNet5Wasm.Server as a startup project.
Note: In order to test the 3.1 version of wasm, use the TestNet31Wasm.Server
- Run the app (Ctrl + F5)
- On the
Index.razor
page, click onitem 2
that has @onfocusout handler
Note: The main logic is part of the Index.razor page only and the script.js file.
Exceptions (if any)
Error: System.ArgumentException: There is no event handler associated with this event. EventId: '3'. (Parameter 'eventHandlerId')
Further technical details
- ASP.NET Core version 3.1, 5.0 RC1
- Include the output of
dotnet --info
- The IDE (VS / VS Code/ VS4Mac) you're running on, and it's version
Additional context
A similar problem is marked to be fixed in multiple cases like:
#17926
#21241
#21366
#21874 (comment)
but the problem is still reproducible in both the 3.1 and 5.0 versions.