-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 #58615
Comments
@sly97 thanks for contacting us. Can you validate that the same behavior works if you switch Blazor Server? Can you also make sure that the underlying JS event is fired on the browser debugger? (You should be able to set a breakpoint when the event is raised). |
I've run into this same exact issue.
I created a test web app project to verify. It works as expected when set to InteractiveServer but as the OP described when set to InteractiveWebAssembly. |
I also checked the underlying JS event and verified it is being fired as expected even when the breakpoint for my .NET event isn't hit. To summarize:
|
@javiercn |
@javiercn the problem still persists in wasm. It only hits the breakpoint with the arrows and not with clicks on the select
|
Also seeing this. Any updates? |
Is there an existing issue for this?
Describe the bug
In .NET8, in a new Blazor WebAssembly app, when using a
<select>
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.
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.
Expected Behavior
Breakpoint is being hit when using the mouse/cursor to select different values from a select statement with the
@onchange
eventSteps To Reproduce
Counter
component)@onchange
event to the select tag, and assign it with a method@onchange
eventThen, try selecting using different values using the up/down keys from the keyboard, and the breakpoint should be hit
Exceptions (if any)
Breakpoint is hit when using the mouse to select different values from a dropdown menu.
.NET Version
8
Anything else?
No response
The text was updated successfully, but these errors were encountered: