fix/disable-translate-on-editor#1049
Open
MahekkumarChaniyara wants to merge 1 commit into
Open
Conversation
Author
|
@zenoamaro Can you please check this issue? I have provided fix also |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title
Chrome Translate causes editor text flicker/auto-erasure while typing
Summary
When Chrome’s page translation feature is active, typing inside the ReactQuill editor becomes unstable. Entered text may flicker, be modified unexpectedly, or get erased.
Environment
Browser: Google Chrome
Feature enabled: Built-in page translation (Translate)
Component: react-quill editor input area (.ql-editor / contenteditable)
Steps to Reproduce
Open a page containing a ReactQuill editor.
Enable Chrome Translate for the page (translate to another language).
Click inside the editor and start typing continuously.
Observe input behavior.
Actual Behavior
Text flickers during typing.
Characters/words are unexpectedly removed or replaced.
Typing experience is unstable.
Expected Behavior
Typing should remain stable and predictable.
Browser translation should not mutate live editor input while user is typing.
Root Cause Chrome Translate modifies contenteditable DOM in real time. Quill also manages the same DOM, causing conflicting mutations and visual/content instability.
Fix Implemented
Set translate="no" on the Quill editable root during editor creation:
editor.root.setAttribute('translate', 'no')
Added a unit test asserting the editable root has translate="no".
Impact
Prevents Chrome Translate from altering editor content while typing.
Reduces flicker and auto-erasure issues.
No functional change to normal editing behavior outside translation interaction.