Closed Bug 1226537 Opened 9 years ago Closed 9 years ago

Spelling not updated in subject if language changed using the spelling button.

Categories

(Thunderbird :: Message Compose Window, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 45.0

People

(Reporter: jorgk-bmo, Assigned: jorgk-bmo)

Details

Attachments

(1 file)

Steps to reproduce:

1) Set your default dictionary to English.
2) Answer an e-mail that contains the Spanish word "lectura" in the subject.
3) While the subject has focus, change the language to Spanish using the "Spelling" button.

Result: Spelling not updated in subject.

Click on the body, then click on the subject again.

Result: Spelling is updated.

This is result of recent changes in Gecko 44 in the spell checker (which I made in bug 1205983). Basically, the recheck happens on focus but not otherwise.

Note: If in step 3) you use the context (right click) menu to change the language, the spelling is updated immediately since in this case, Gecko has the full control.

This is a cosmetic problem which should be fixable with a small change in ChangeLanguage() in mail/components/compose/content/MsgComposeCommands.js (I hope).
Philip: You need to do something similar in S/M.
Assignee: nobody → mozilla
Status: NEW → ASSIGNED
Flags: needinfo?(philip.chee)
Attachment #8690299 - Flags: review?(mkmelin+mozilla)
Comment on attachment 8690299 [details] [diff] [review]
Proposed solution (v1).

Review of attachment 8690299 [details] [diff] [review]:
-----------------------------------------------------------------

Thx! r=mkmelin
Attachment #8690299 - Flags: review?(mkmelin+mozilla) → review+
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 45.0
(In reply to Jorg K (GMT+1) from comment #1)

> Philip: You need to do something similar in S/M.
It looks like we had something similar to this since SeaMonkey 1.0:
> http://hg.mozilla.org/comm-central/annotate/07d03fadd4ea/suite/mailnews/compose/MsgComposeCommands.js#l2228

Except yours has a null check in between:
https://hg.mozilla.org/comm-central/rev/7a0e61568cf8c0356ec041fa8952df378d6739bd#l1.20
Any reason for that?
Flags: needinfo?(mozilla)
Flags: needinfo?(philip.chee)
Oh, you finally got to this NI ;-)
If you had that line since day one and the STR to reproduce don't cause a problem, then it's all good.

The change needs to be seen in context:
+
+      // Also force a recheck of the subject. If for some reason the spell
+      // checker isn't ready yet, don't auto-create it, hence pass 'false'.
+      var inlineSpellChecker =
+        GetMsgSubjectElement().editor.getInlineSpellChecker(false);
+      if (inlineSpellChecker) {
+        inlineSpellChecker.spellCheckRange(null);
+      }
+    }

I most certainly had a case where there the spell checker wasn't ready, I didn't want to auto-create it, so there was no recheck possible.
Flags: needinfo?(mozilla)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: