[Blazor] preventDefault does not function in Auto render mode, even if the page is marked with InteractiveWebAssembly
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
`Click me`
it is not preventing the default handling in a Blazor App with Auto interactivity, even if the page is properly configured for WebAssembly. If the App is created only with WebAssembly interactivity, it works as expected.
#50992 is similar, but it does not indicate any resolution.
### Expected Behavior
preventDefault should prevent any further navigation
### Steps To Reproduce
- Create a Blazor App with Auto interactivity
- In the Counter.razor page from the Blazor WebApp template, replace the button markup with: `Click me`
- Even if the page is marked with `@rendermode InteractiveAuto` or `@rendermode InteractiveWebAssembly`, clicking on the link triggers the default navigation to home. preventDefault should have stopped this.
### Exceptions (if any)
If the Blazor App is created only with WebAssembly interactivity, it works as expected.
### .NET Version
8.0.100
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.