You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blazor WebAssembly - HTML select tag with @onchange event does not hit breakpoint when clicking to select values from dropdown using the cursor, but works with up/down key from keyboard
#11366
Open
1 task done
Marques01 opened this issue
Jan 6, 2025
· 0 comments
In .NET8 and .NET9, in a new Blazor WebAssembly app, when using a tag, with the @onchange event, if I put a breakpoint in the method being triggered (i.e. @onchange="Test"), the breakpoint will not be hit if I click on different values in the dropdown using the mouse.
However, the breakpoint is being hit fine when using the up/down keys from the keyboard.
works @onchange event, but no
In addition, when using the mouse, I can see that the method is run and states are changed - the issue I experienced is the breakpoint that is not being hit.
Additional info: doing the same in .NET6 works fine, and breakpoint is being hit just fine in all cases.
@page "/"
Countries
<select class="form-select" @onchange="OnCountryChanged">
USA>
Canada
Mexico
@code {
Breakpoint is being hit when using the mouse/cursor to select different values from a select statement with the @onchange event
Steps To Reproduce
Create a new Blazor Web Assembly (WASM) project in VS2022.
Add a select tag to any page (I did it to the Counter component)
add the @onchange event to the select tag, and assign it with a method
Put a breakpoint in the method assigned to the @onchange event
Run the app, click on different values in the dropdown, and see that the breakpoint is not being hit.
Then, try selecting using different values using the up/down keys from the keyboard, and the breakpoint should be hit
Exceptions (if any)
No response
.NET Version
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Describe the bug
In .NET8 and .NET9, in a new Blazor WebAssembly app, when using a tag, with the @onchange event, if I put a breakpoint in the method being triggered (i.e. @onchange="Test"), the breakpoint will not be hit if I click on different values in the dropdown using the mouse. However, the breakpoint is being hit fine when using the up/down keys from the keyboard. works @onchange event, but no In addition, when using the mouse, I can see that the method is run and states are changed - the issue I experienced is the breakpoint that is not being hit. Additional info: doing the same in .NET6 works fine, and breakpoint is being hit just fine in all cases. @page "/" Countries <select class="form-select" @onchange="OnCountryChanged"> USA> Canada Mexico
@code {
}
reference: dotnet/aspnetcore#58615
Expected Behavior
Breakpoint is being hit when using the mouse/cursor to select different values from a select statement with the @onchange event
Steps To Reproduce
Create a new Blazor Web Assembly (WASM) project in VS2022.
Add a select tag to any page (I did it to the Counter component)
add the @onchange event to the select tag, and assign it with a method
Put a breakpoint in the method assigned to the @onchange event
Run the app, click on different values in the dropdown, and see that the breakpoint is not being hit.
Then, try selecting using different values using the up/down keys from the keyboard, and the breakpoint should be hit
Exceptions (if any)
No response
.NET Version
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: