question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Accepting spellcheck suggestion deletes containing span

See original GitHub issue

This bug is rather specific but definitely reproducible and does happen in practice.

Steps for Reproduction

GIF of this happening: screen recording 2019-02-28 at 02 31 pm

  1. Use Chrome.
  2. Create a new Google doc: https://docs.new
  3. Type in Sentence wthi a typo. Copy the sentence.
  4. Visit https://quilljs.com
  5. Paste.
  6. 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:open
  • Created 5 years ago
  • Reactions:2
  • Comments:11

github_iconTop GitHub Comments

1reaction
maniyadvcommented, Sep 24, 2020

I got this solved by formatting the pasted content to plaintext before spell check using -

quill.clipboard.addMatcher (Node.ELEMENT_NODE, function (node, delta) {
    var plaintext = node.innerText
    var Delta = Quill.import('delta')
    return new Delta().insert(plaintext)
})

Or use - https://www.npmjs.com/package/quill-paste-smart

0reactions
kenichi-andocommented, Jun 15, 2021

This seems to be a duplicate of https://github.com/quilljs/quill/issues/2096.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found