entries in languages menu of context menu get multiplied several times

RESOLVED FIXED in seamonkey2.11


MailNews: Composition
6 years ago
5 years ago


(Reporter: Martin Honnen, Assigned: ewong)



SeaMonkey Tracking Flags

(seamonkey2.9 fixed, seamonkey2.10 fixed)


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


(1 attachment, 1 obsolete attachment)



6 years ago
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 http://home.arcor.de/martin.honnen/images/SeaMonkey2011121202.png.

At least one other user has confirmed the problem in http://groups.google.com/group/de.comm.software.mozilla.mailnews/browse_thread/thread/505c71f97b940269/be9d4402e9b14d8b?q=group:de.comm.software.mozilla.mailnews#be9d4402e9b14d8b.

Comment 1

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

Comment 3

6 years ago
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...

Comment 4

6 years ago
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.


6 years ago
Whiteboard: [mentor=Neil][lang=js]

Comment 5

6 years ago
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]

Comment 6

6 years ago
Created attachment 609123 [details] [diff] [review]
Remove entries from languages menu before recreating language list.
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 8

6 years ago
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 http://mxr.mozilla.org/comm-central/source/suite/common/nsContextMenu.js#476

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-

Comment 9

6 years ago
Created attachment 609257 [details] [diff] [review]
Remove language entries. (V2)
Attachment #609123 - Attachment is obsolete: true
Attachment #609257 - Flags: review?(iann_bugzilla)


6 years ago
Attachment #609257 - Flags: review?(iann_bugzilla) → review+
Once this has landed and verified, we should get this onto both Aurora and Beta.

Comment 11

6 years ago
Pushed to comm-central:
Last Resolved: 6 years ago
Resolution: --- → FIXED

Comment 12

6 years ago
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+

Comment 13

6 years ago
Pushed to comm-aurora:

Comment 14

6 years ago
Pushed to comm-beta:
status-seamonkey2.10: --- → fixed
status-seamonkey2.9: --- → fixed
Target Milestone: --- → seamonkey2.11


5 years ago
Blocks: 751053
You need to log in before you can comment on or make changes to this bug.