Accepting spellcheck suggestion deletes containing span
See original GitHub issueThis bug is rather specific but definitely reproducible and does happen in practice.
Steps for Reproduction
GIF of this happening:
- Use Chrome.
- Create a new Google doc: https://docs.new
- Type in
Sentence wthi a typo
. Copy the sentence. - Visit https://quilljs.com
- Paste.
- Wait for
wthi
to get a red underline. Then click it and accept the suggestion.
Expected behavior: The suggestion should be selected.
Actual behavior: The entire sentence is deleted. In the console:
addRange(): The given range isn't in document.
value @ selection.js:294
(anonymous) @ selection.js:48
o.emit @ index.js:151
value @ emitter.js:29
value @ scroll.js:162
(anonymous) @ scroll.ts:29
Platforms: macOS Mojave, Chrome Version 73.0.3683.46 (Official Build) beta (64-bit)
Version: 1.3.6
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:11
Top Results From Across the Web
Check your spelling & grammar in Google Docs - Computer
Check spelling & grammar · Press Tab to accept the suggestion. · Right-click the red or blue underline. To accept the suggestion, click...
Read more >VS Code: enable inline spell checker, but disable spell check ...
Right click on word and click show spell check configuration info from menu .A spell checker tab will appear then click ...
Read more >Gboard Spell Check not suggesting obvious corrected words ...
It appears to be an APP problem, rather than a Gboard problem. Messages and Voice underline misspelled words in blue with suggestions. Gmail...
Read more >Troubleshoot checking spelling and grammar in multiple ...
Why spell check isn't working for a different language, such as French or Spanish.
Read more >spellcheck - HTML: HyperText Markup Language | MDN
Using spellchecking can have consequences for users' security and privacy. The specification does not regulate how spellchecking is done and the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I got this solved by formatting the pasted content to plaintext before spell check using -
Or use - https://www.npmjs.com/package/quill-paste-smart
This seems to be a duplicate of https://github.com/quilljs/quill/issues/2096.