Skip to content
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 @onclick not working #55225

Closed
1 task done
eduardoxvii opened this issue Apr 19, 2024 · 2 comments
Closed
1 task done

Blazor @onclick not working #55225

eduardoxvii opened this issue Apr 19, 2024 · 2 comments
Labels
area-blazor Includes: Blazor, Razor Components ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved

Comments

@eduardoxvii
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The @OnClick is not trigging

Expected Behavior

I want my page buttons to work if the user is translating the page...

Steps To Reproduce

Create a Blazor project with interactive render mode with Auto;
Run the project;
Click on counter menu;
Translate the page for Portuguese for exemple;
Click on button;
You'll see that is not working!!!

Exceptions (if any)

No response

.NET Version

.net 8

Anything else?

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Apr 19, 2024
@MariovanZeist
Copy link
Contributor

Hi @eduardoxvii

The main issue here is that Blazor (and other frameworks) don't react well to DOM manipulations not under their control.

I would recommend you disable the automatic translation of web pages
One way to do this globally is by adding translate="no" to the html tag (<html translate="no")

Duplicates
#26945
#47111

@javiercn javiercn added the ✔️ Resolution: Duplicate Resolved as a duplicate of another issue label Apr 21, 2024
@javiercn
Copy link
Member

@eduardoxvii thanks for contacting us.

@MariovanZeist answer is correct here.

@javiercn javiercn closed this as not planned Won't fix, can't repro, duplicate, stale Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved
Projects
None yet
Development

No branches or pull requests

3 participants