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

Misspelled words are deleted from the text after hitting "remove spelling" #17

Open
GoogleCodeExporter opened this issue Sep 15, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Open the spellchecker demo page http://spellchecker.jquery.badsyntax.co.uk/
2. Hit "Check Spelling"
3. Hit "Remove Spelling"

What is the expected output? What do you see instead?

Instead of showing the misspelled words without underlines and suggestion 
popups, they are simply deleted from the text. If you hit "check spelling" 
another time, an alert says that no mistakes have been found.




Original issue reported on code.google.com by fbuchin...@gmail.com on 10 Feb 2011 at 10:35

@GoogleCodeExporter
Copy link
Author

I have just come across this issue as well. Looks like "remove" gets rid of the 
spans that have been put round the identified words along with the words.

Original comment by tcsmith1...@googlemail.com on 26 Mar 2012 at 10:40

@GoogleCodeExporter
Copy link
Author

Had a look at this a bit more and managed to come up with a fix. Replace line 
316 from

this.after(this.innerHTML).remove();

to

$(this).replaceWith(this[0].innerText);

and it seems to fix the issue. Can I help to submit this at all?

Original comment by tcsmith1...@googlemail.com on 26 Mar 2012 at 10:57

@GoogleCodeExporter
Copy link
Author

Changing to

$(this).replaceWith($(this).html());

Seems to work.

Original comment by jason.fa...@gmail.com on 29 Aug 2012 at 11:46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant