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

Avoid error on "verify-email" page under browser auto-translation #42

Merged
merged 2 commits into from
Oct 24, 2024

Conversation

Rindrics
Copy link
Contributor

@Rindrics Rindrics commented Oct 23, 2024

Summary

Enable signing up in environment with browser auto-translation by preventing unintended change in element class of OTP field

Related Issue

Changes

Disallow translation on OTP "field" on /signup/verify-email

  • User experience is not affected because translation is still available for /signup/verify-email "page"
    image

Testing

  • bun run dev on local
  • enable Japanese translation on browser
  • confirm that pressing backspace key produces no error on /signup/verify-email page

Other Information

to avoid error on DOM manipulation

otherwise we'll get error below:
> NotFoundError: Failed to execute 'removeChild' on 'Node': The node
> to be removed is not a child of this node.
Copy link

vercel bot commented Oct 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
giselle ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 9:51am

@Rindrics Rindrics changed the title Avoid error on "verify-email" page with browser auto-translation Avoid error on "verify-email" page under browser auto-translation Oct 23, 2024
Copy link
Contributor

@toyamarinyon toyamarinyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment to describe the "notranslate" class that will prevent Chrome's translation feature. No class name provided tailwindcss

You can now add class="notranslate" to any HTML element to prevent that element from being translated. For example, you may want to do something like:

https://developers.google.com/search/blog/2008/10/helping-you-break-language-barrier

Copy link
Member

@shige shige left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@Rindrics
Copy link
Contributor Author

add a comment to describe the "notranslate" class that will prevent Chrome's translation feature. No class name provided tailwindcss

yeah you're right.

fixed: https://github.com/route06inc/giselle/pull/42/commits/c8dd9b674a429e9385f0a83f881c3567f46d8c64txyo

@Rindrics
Copy link
Contributor Author

thx!

@Rindrics Rindrics merged commit c5429f4 into main Oct 24, 2024
7 checks passed
@Rindrics Rindrics deleted the issue-41-error-signup branch October 24, 2024 02:14
@shige shige added the enhancement New feature or request label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Got error on signing up when browser translation is enabled
3 participants