[Blazor] add support for the onmouseenter and onmouseleave dom events in components #13104
Labels
area-blazor
Includes: Blazor, Razor Components
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
Milestone
Until preview 7, I could bind an handler to the onmouseenter and onmouseleave events using a syntax similar to
onmouseenter="@MouseEnter"
. Now this syntax is not working anymore and the syntax@onmouseenter="MouseEnter"
leads to this runtime error in Blazor Wasm:Microsoft.JSInterop.JSException: Failed to execute 'setAttribute' on 'Element': '@onmouseenter' is not a valid attribute name.
Describe the solution you'd like
Add the onmouseenter and onmouseleave to the list of the supported mouse events (I don't know if it's just a matter of adding them to the EventHandlers.cs) class.
Additional context
I'm using those events on a div containing a number of other elements. Using the onmouseover and onmouseout events (which are supported) can't be a solution because they're fired when crossing the boudaries of the external div but also whenever the mouse crosses the border of any of the internal elements causing the events to be fired multiple times.
The text was updated successfully, but these errors were encountered: