diff --git a/mozilla/mailnews/compose/resources/content/MsgComposeCommands.js b/mozilla/mailnews/compose/resources/content/MsgComposeCommands.js index 4f44cb63174..7ca1ea65c1b 100644 --- a/mozilla/mailnews/compose/resources/content/MsgComposeCommands.js +++ b/mozilla/mailnews/compose/resources/content/MsgComposeCommands.js @@ -241,6 +241,9 @@ var gComposeRecyclingListener = { document.getElementById("FormatToolbar").hidden = false; } + // Stop InlineSpellChecker so personal dictionary is saved + StopInlineSpellChecker(); + //Reset editor EditorResetFontAndColorAttributes(); EditorCleanup(); @@ -1510,6 +1513,9 @@ function ComposeUnload() { dump("\nComposeUnload from XUL\n"); + // Stop InlineSpellChecker so personal dictionary is saved + StopInlineSpellChecker(); + EditorCleanup(); RemoveMessageComposeOfflineObserver(); @@ -2045,6 +2051,12 @@ function addRecipientsToIgnoreList(aAddressesToAdd) } } +function StopInlineSpellChecker() +{ + if (InlineSpellChecker.inlineSpellChecker) + InlineSpellChecker.inlineSpellChecker.enableRealTimeSpell = false; +} + function ToggleInlineSpellChecker(target) { if (InlineSpellChecker.inlineSpellChecker)