
Spell Checker does not replace the wrong spelling with the right one
I have a GWT application which has a textarea. When the user types a wrong spelling, it gets underlined in red. When the user right clicks on the wrong spelling, the popup menu provides some suggestions; The user clicks on one of the suggestions but the wrong spelling does not get replaced.
The javascript console contains the following error: [18:54:12.843] NS_ERROR_INVALID_POINTER: Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIInlineSpellChecker.replaceWord] @ resource://gre/modules/InlineSpellChecker.jsm:273
Please let me know how to fix this problem.
All Replies (10)
If this is while using Firefox, try to Firefox in Safe Mode to see if the problem still happens.
Try Firefox Safe Mode to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
(If you're not using it, switch to the Default theme.)
- On Windows you can open Firefox 4.0+ in Safe Mode by holding the Shift key when you open the Firefox desktop or Start menu shortcut.
- On Mac you can open Firefox 4.0+ in Safe Mode by holding the option key while starting Firefox.
- On Linux you can open Firefox 4.0+ in Safe Mode by quitting Firefox and then going to your Terminal and running: firefox -safe-mode (you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
- Or open the Help menu and click on the Restart with Add-ons Disabled... menu item while Firefox is running.
Once you get the pop-up, just select "'Start in Safe Mode"
If the issue is not present in Firefox Safe Mode, your problem is probably caused by an extension, and you need to figure out which one. Please follow the Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems article for that.
To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.
When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.
Thank you.
Hi Fred,
Thanks for the reply, but the problem persists even in safe mode.
Thanks, Aniruddha
Hmmm. Okay I have two options to think of. Option 1; go to www.Mozilla.org, and download the current version of Firefox. DO NOT UPDATE, cet the full download. See if that helps. If not you can try to reset Firefox to its defaut settings. BUT this will also remove all add-ons and your settings. Most other things like bookmarks will be saved.
Hi Fred,
Thanks for the reply I uninstalled Firefox, deleted the C:\Program Files(x86)\Mozilla Firefox directory, downloaded and installed the latest Firefox (25.0.1) installer from http://www.mozilla.org.
The problem is still reproducible :( I still get the same error in the JavaScript console.
Is there any way I could debug the InlineSpellChecker.jsm?
Thanks, Aniruddha
Above my abilities I am sorry to say. I can give you two more things to try. 1> remove, then reinstall the spell checker. 2> reset Firefox.
The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
Note: This will cause you to lose any Extensions and some Preferences.
- Open websites will not be saved in Firefox versions lower than 25.
To Reset Firefox do the following:
- Go to Firefox > Help > Troubleshooting Information.
- Click the "Reset Firefox" button.
- Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
- Firefox will open with all factory defaults applied.
Further information can be found in the Refresh Firefox - reset add-ons and settings article.
Did this fix your problems? Please report back to us!
Thank you.
Hi Fred,
Thanks for replying. "Reset Firefox" did not help. Please let me know how to remove & re-install spell checker.
Thanks, Aniruddha
Note that you can open such built-in pages via the location bar to inspect the code.
- resource://gre/modules/InlineSpellChecker.jsm
Open the page source to get easier access to specific lines.
- Firefox > Web Developer > Page Source
- Tools > Web Developer > Page Source (Ctrl+U)
- right-click on a web page to open the context menu and select View Page Source
Does this only happen with that GWT application?
Is this a normal text area or a rich text (contenteditable) area?
Maybe try the debugger in the current Nightly build to see if that allows to troubleshoot this issue.
Hi cor-el,
Thanks for your reply. I was able to take a look at the InlineSpellChecker.jsm. The code at line 273 is
this.mInlineSpellChecker.replaceWord(this.mWordNode, this.mWordOffset, this.mSpellSuggestions[index]);
To determine which one of these is null ( I assume that NS_ERROR_INVALID_POINTER means that something there is a null pointer), I will need to debug (or at least be able to modify) InlineSpellChecker.jsm.
It happens only with that GWT application. BUT, it happens only in Firefox; Chrome & Safari are able to replace the wrong spelling.
This being a GWT application there is not much in the Page Source. The page is created through JavaScript. Here is the element as seen from the inspector: <textarea maxlength="240" class="propertyEditValue propertyPendingChangeValue"></textarea>
It is a normal text area.
Thanks, Aniruddha
Modified
=
DUPLICATE POST - PLEASE IGNORE
=
Hi cor-el,
Thanks for your reply. I was able to take a look at the InlineSpellChecker.jsm. The code at line 273 is
this.mInlineSpellChecker.replaceWord(this.mWordNode, this.mWordOffset, this.mSpellSuggestions[index]);
To determine which one of these is null ( I assume that NS_ERROR_INVALID_POINTER means that something there is a null pointer), I will need to debug (or at least be able to modify) InlineSpellChecker.jsm.
It happens only with that GWT application. BUT, it happens only in Firefox; Chrome & Safari are able to replace the wrong spelling.
This being a GWT application there is not much in the Page Source. The page is created through JavaScript. Here is the element as seen from the inspector: <textarea maxlength="240" class="propertyEditValue propertyPendingChangeValue"></textarea>
It is a normal text area.
Thanks, Aniruddha
Modified
The root cause of the problem is changing the overflow in the css on hover. I am able to reproduce this problem using this html:
<html> <head> <style> .mystyle { overflow: hidden; } .mystyle:hover { overflow: auto; } </style> </head> <body> <div class="mystyle"> <textarea >coww</textarea> </div> </body> </html>
Another interesting fact is that if I use the keyboard to bring up the popup menu and choose the correct spelling, then it works. In other words it works if the mouse pointer is nowhere near the text area.
Is this a bug in firefox?
Modified