Context menu from spellchecker keeps growing

RESOLVED FIXED

Status

()

RESOLVED FIXED
13 years ago
7 years ago

People

(Reporter: mossop, Unassigned)

Tracking

({fixed1.8.1})

Trunk
x86
Windows XP
fixed1.8.1
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

13 years ago
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
(Reporter)

Comment 1

13 years ago
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

Comment 2

13 years ago
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.
(Reporter)

Comment 3

13 years ago
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
(Reporter)

Comment 4

13 years ago
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.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

Updated

13 years ago
Blocks: 302050

Updated

13 years ago
Blocks: 335306

Comment 5

13 years ago
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.
Attachment #205987 - Attachment is obsolete: true
Attachment #219937 - Flags: review?(bugs)

Updated

13 years ago
Attachment #219937 - Flags: approval-branch-1.8.1?(bugs)
Comment on attachment 219937 [details] [diff] [review]
Patch

r+a=ben@mozilla.org
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+

Comment 7

13 years ago
Fixed on 1.8 branch and trunk.
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED

Updated

13 years ago
No longer depends on: 320295

Updated

7 years ago
Depends on: 708071
You need to log in before you can comment on or make changes to this bug.