Bug 637631 followup because I moved the wrong line by mistake
--- a/editor/ui/composer/content/editor.js
+++ b/editor/ui/composer/content/editor.js
@@ -414,18 +414,18 @@ var gEditorDocumentObserver =
// Set focus to content window if not a mail composer
// Race conditions prevent us from setting focus here
// when loading a url into blank window
setTimeout(SetFocusOnStartup, 0);
// Call EditorSetDefaultPrefsAndDoctype first so it gets the default author before initing toolbars
editor.enableUndo(false);
- editor.documentCharacterSet = prefCharsetString;
EditorSetDefaultPrefsAndDoctype();
+ editor.resetModificationCount();
editor.enableUndo(true);
// We may load a text document into an html editor,
// so be sure editortype is set correctly
// XXX We really should use the "real" plaintext editor for this!
if (editor.contentsMIMEType == "text/plain")
{
try {
@@ -2460,17 +2460,17 @@ function EditorSetDefaultPrefsAndDoctype
var prefCharsetString = 0;
try
{
prefCharsetString = gPrefs.getComplexValue("intl.charset.default",
Components.interfaces.nsIPrefLocalizedString).data;
}
catch (ex) {}
if ( prefCharsetString && prefCharsetString != 0)
- editor.resetModificationCount();
+ editor.documentCharacterSet = prefCharsetString;
var node = 0;
var listlength = nodelist.length;
// let's start by assuming we have an author in case we don't have the pref
var authorFound = false;
for (var i = 0; i < listlength && !authorFound; i++)
{