Closed Bug 319315 Opened 19 years ago Closed 19 years ago

Context menu from spellchecker keeps growing

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mossop, Unassigned)

References

Details

(Keywords: fixed1.8.1)

Attachments

(1 file, 1 obsolete file)

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
Attached patch Destroy context menu if it's still there (obsolete) (deleted) — Splinter Review
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.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Blocks: 302050
Blocks: 335306
Attached patch Patch (deleted) — Splinter Review
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.
Attachment #205987 - Attachment is obsolete: true
Attachment #219937 - Flags: review?(bugs)
Attachment #219937 - Flags: approval-branch-1.8.1?(bugs)
Attachment #219937 - Flags: review?(bugs)
Attachment #219937 - Flags: review+
Attachment #219937 - Flags: approval-branch-1.8.1?(bugs)
Attachment #219937 - Flags: approval-branch-1.8.1+
Fixed on 1.8 branch and trunk.
Status: NEW → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
No longer depends on: 320295
Depends on: 708071
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: