Bug 1354862 - Port bug 1353326 [Do not insert leading blank lines before Quotation if Signature is added automatically to Reply] to SeaMonkey. r=frg
authorHartmut Figge <h.figge@gmx.de>
Fri, 14 Apr 2017 19:35:51 +0200
changeset 28040 b70577e40f7dd1fe5ec6657164c560ea6b3af0f4
parent 28039 4cc7e241a7d02dd1a662f37cd2b674a1566f2306
child 28041 47f6c719478575b711b0a8c70e5c80d297f4a175
push id1966
push userclokep@gmail.com
push dateMon, 12 Jun 2017 16:57:35 +0000
treeherdercomm-beta@32d9b8d10da1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrg
bugs1354862, 1353326
Bug 1354862 - Port bug 1353326 [Do not insert leading blank lines before Quotation if Signature is added automatically to Reply] to SeaMonkey. r=frg
suite/mailnews/compose/MsgComposeCommands.js
--- a/suite/mailnews/compose/MsgComposeCommands.js
+++ b/suite/mailnews/compose/MsgComposeCommands.js
@@ -3085,16 +3085,19 @@ function InitEditor(editor)
   var eEditorMailMask = Components.interfaces.nsIPlaintextEditor.eEditorMailMask;
   editor.flags |= eEditorMailMask;
   GetMsgSubjectElement().editor.flags |= eEditorMailMask;
 
   // Control insertion of line breaks.
   editor.returnInParagraphCreatesNewParagraph =
     Services.prefs.getBoolPref("mail.compose.default_to_paragraph") ||
     Services.prefs.getBoolPref("editor.CR_creates_new_p");
+  // Traditionally we want <br> elements for newlines, unless we're
+  // splitting a paragraph (which is not affected by this setting).
+  editor.document.execCommand("defaultparagraphseparator", false, "br");
 
   gMsgCompose.initEditor(editor, window.content);
   InlineSpellCheckerUI.init(editor);
   EnableInlineSpellCheck(getPref("mail.spellcheck.inline"));
   document.getElementById("menu_inlineSpellCheck").setAttribute("disabled", !InlineSpellCheckerUI.canSpellCheck);
 
   // Listen for spellchecker changes, set the document language to the
   // dictionary picked by the user via the right-click menu in the editor.