Don't check subject if spellchecker is not ready
Categories
(SeaMonkey :: MailNews: Composition, defect)
Tracking
(seamonkey2.53+ fixed)
People
(Reporter: philip.chee, Assigned: frg)
References
()
Details
(Whiteboard: SM2.53.15)
Attachments
(1 file, 1 obsolete file)
3.03 KB,
patch
|
frg
:
review+
frg
:
approval-comm-release+
frg
:
approval-comm-esr60+
|
Details | Diff | Splinter Review |
STR: Compose a new message or reply to one. Change spellcheck language See error in Error Console Fri Sep 19 2014 14:52:38 Error: NS_ERROR_NOT_INITIALIZED: Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIInlineSpellChecker.spellCheckRange] Source file: chrome://messenger/content/messengercompose/MsgComposeCommands.js Line: 1829
Reporter | ||
Comment 1•10 years ago
|
||
Perma-link to MXR: http://mxr.mozilla.org/comm-central/source/suite/mailnews/compose/MsgComposeCommands.js?rev=fd84c515f4c8&mark=1828-1829#1815
Assignee | ||
Comment 2•2 years ago
•
|
||
I can reproduce this when I do not select the subject first. Seems the spellchecker is not initialized then.
Reply->Spell->change dictionary->error
Reply->select subject->select message text->Spell->change dictionary->ok
Initially the subject seems to be never checked unless you select it at least once.
The code from TB Bug 1277658 with the null check works around it. Needs spellcheck=true set for the subject filed so that the editor in the textfield has a spellchecker.
Assignee | ||
Comment 3•2 years ago
|
||
[Approval Request Comment]
Regression caused by (bug #): n.n.
User impact if declined: error in the log.
Testing completed (on m-c, etc.): 2.53.15b1 pre.
Risk to taking this patch (and alternatives if risky): Behaviour matches the TB in our tree.
String changes made by this patch: --
Initially the subject is still not checked until selected but same with or without the patch and matches TB behaviour build from our tree.
Comment on attachment 9296128 [details] [diff] [review] 1069787-spellchecker-subject-25315.patch >+++ b/suite/mailnews/components/compose/content/MsgComposeCommands.js > // now check the document and the subject over again with the new dictionary >- if (InlineSpellCheckerUI.enabled) >- { >+ if (InlineSpellCheckerUI.enabled) { > InlineSpellCheckerUI.mInlineSpellChecker.spellCheckRange(null); >- GetMsgSubjectElement().inputField.parentNode.spellCheckerUI.mInlineSpellChecker.spellCheckRange(null); >+ >+ // Also force a recheck of the subject. The spell checker >+ // for the subject isn't always resdy yet. Usually throws unless you Nit: ready rather than resdy, also can the comment be formatted to 80 characters. >+ // selected the subject at least once. So don't auto-create it, hence >+ // pass 'false'. >+ let inlineSpellChecker = >+ GetMsgSubjectElement().editor.getInlineSpellChecker(false); >+ if (inlineSpellChecker) { >+ inlineSpellChecker.spellCheckRange(null); >+ } Also can the first line of the file be changed to something like: /* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ r/a=me with those addressed / fixed.
Assignee | ||
Comment 5•2 years ago
|
||
Review comments addressed. r/a+ from IanN retained. I will fix the header in a follow-up.
Pushed by frgrahl@gmx.net:
https://hg.mozilla.org/comm-central/rev/5c73e160fd85
Don't check subject if spellchecker is not ready. r=IanN
Assignee | ||
Comment 7•1 year ago
|
||
https://gitlab.com/seamonkey-project/seamonkey-2.53-comm/-/commit/e226352daca69258cea651e0d8a9e3327e619721
Don't check subject if spellchecker is not ready. r=IanN a=IanN
Description
•