When testing the spellchecker from bug 302050 I came across an issue with the context menu of textfields. It seems that old suggestions are not removed from the menu. After it has made suggestions they remain to be seen when right clicking on a totally different misspelling, or anywhere on the page. A similar thing happens with the languages sub menu which has languages added to it each time the context menu is opened. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20051205 Firefox/1.6a1 ID:2005120522
Some reproduction steps: 1. Open firefox and open a page with a text area in it. There will be no problem with this. 2. Open a second tab and open a page with a text area in it. Whenever you right click on the text area in the second tab, the dictionaries list will grow. On the text area on the first tab the dictionaries list will remain constant.
Summary: Context menu from specllchecker keeps growing → Context menu from spellchecker keeps growing
It sounds like the popup hiding event is not getting called (this is what erases the old items). I was unable to reproduce this on my Linux system, however. I'll try on Windows later when I get a build going.
I've done some tracking down on this and determined that its not really the fault of the spell checking code. It seems that in certain situations the context menu gets initialised twice when its shown, and not uninitialised in between. I've filed bug 320295 on this and I expect that if that gets fixed then this problem will be solved.
Depends on: 320295
Created attachment 205987 [details] [diff] [review] Destroy context menu if it's still there This is a workaround patch that I'm using on my system. When the context menu is popped up it first checks to see if it has previously been correctly hidden and if not hides the old one. This might be useful if bug 320295 is not fixed before the spellchecker is to be included in the standard firefox build.
Created attachment 219937 [details] [diff] [review] Patch I didn't realize Dave already put a patch here. This patch just cleans up the menu when it is shown again. I don't think there is any advantage of my way over Dave's, so I'll just use this since I already have it. This also as a minor enhancement to the spellchecker UI functions that inits the variables before the init function is called.
Comment on attachment 219937 [details] [diff] [review] Patch firstname.lastname@example.org
Fixed on 1.8 branch and trunk.
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.