Closed Bug 709819 Opened 8 years ago Closed 8 years ago

entries in languages menu of context menu get multiplied several times


(SeaMonkey :: MailNews: Composition, defect)

Not set


(seamonkey2.9 fixed, seamonkey2.10 fixed)

Tracking Status
seamonkey2.9 --- fixed
seamonkey2.10 --- fixed


(Reporter: martin.honnen, Assigned: ewong)



(Whiteboard: [mentor=Neil][lang=js][good first bug])


(1 file, 1 obsolete file)

The problem occurs within the "languages" sub menu of the context menu of the compose window, where you are supposed to select the right language for spell checking. When I used that menu to select a language in one instance of the compose window, close that window, open a new one and try the menu again the entries in that menu are duplicated and when you repeat that approach the menu keeps growing until a restart of SeaMonkey.

Initially the problem occurred for me when I used the English US version of SeaMonkey and had an additional German dictionary installed. However I uninstalled the German dictionary and started SeaMonkey in "safe mode", yet the problem persists, I then get several "English / United States" entries once I used the menu as described above.

A screen shot is at

At least one other user has confirmed the problem in
This sounds like Bug 688860 which also involve multiple compose windows and spell checking. If you feel confident enough you could try the latest SeaMonkey 2.8a1 builds. But make sure you test this on a separate profile you can thow away if necessary.
I can reproduce this on Linux, with anything from SM 2.2 to current SM trunk (2.9a1). Nothing on the Error Console. Probably an issue with initialization vs. compose window recycling? Maybe Neil knows.

SM 2.1 behaves differently; I don't have that menu item there and the Spelling toolbar button is broken. :-/ SM 2.0 doesn't have the menu item either, so I guess it was introduced with SM 2.2. I didn't find anything in the corresponding release notes, though. :-/
OS: Windows 7 → All
Hardware: x86_64 → All
Version: SeaMonkey 2.5 Branch → Trunk
The inline spellcheck UI gets reinitialised every time the compose window is reopened. As part of initialisation, it forgets about any menuitems that it added to the context menu...

There is a function that removes the menuitems, which would fix the problem, if only there was a convenient place to call it...
Ah of course, the compose recycling listener already removes the suggestions from the menu, so we just need to remove the dictionaries at the same time.
Whiteboard: [mentor=Neil][lang=js]
I suppose I should also add [good first bug] in case some one is searching bugzilla for the old GFB whiteboard status.
Whiteboard: [mentor=Neil][lang=js] → [mentor=Neil][lang=js][good first bug]
Assignee: nobody → ewong
Attachment #609123 - Flags: review?(iann_bugzilla)
Comment on attachment 609123 [details] [diff] [review]
Remove entries from languages menu before recreating language list.

Review of attachment 609123 [details] [diff] [review]:

::: suite/common/nsContextMenu.js
@@ +332,2 @@
>        InlineSpellCheckerUI.addDictionaryListToMenu(dictMenu, dictSep);
>      }

Drive-by nit: With the block reduced to a single line, the braces can go.
Comment on attachment 609123 [details] [diff] [review]
Remove entries from languages menu before recreating language list.

This isn't the correct way to remove dictionaries form the menu. The correct way is

Note of course that this already exists in nsContextMenu.js, so the problem is specific to the message compose window, because of the way it recycles.
Attachment #609123 - Flags: review?(iann_bugzilla) → review-
Attachment #609123 - Attachment is obsolete: true
Attachment #609257 - Flags: review?(iann_bugzilla)
Attachment #609257 - Flags: review?(iann_bugzilla) → review+
Once this has landed and verified, we should get this onto both Aurora and Beta.
Pushed to comm-central:
Closed: 8 years ago
Resolution: --- → FIXED
Comment on attachment 609257 [details] [diff] [review]
Remove language entries. (V2)

[Approval Request Comment]
Regression caused by (bug #): 
User impact if declined: 
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky):
String changes made by this patch:
Attachment #609257 - Flags: approval-comm-beta?
Attachment #609257 - Flags: approval-comm-aurora?
Attachment #609257 - Flags: approval-comm-beta?
Attachment #609257 - Flags: approval-comm-beta+
Attachment #609257 - Flags: approval-comm-aurora?
Attachment #609257 - Flags: approval-comm-aurora+
Target Milestone: --- → seamonkey2.11
Blocks: 751053
You need to log in before you can comment on or make changes to this bug.