In our rich-text editor (used in Firefox for designMode and contenteditable), when the user hits Enter, we have historically always inserted a <br>. This does not match any other browsers, which use <p> or <div> as line separators. In bug 1297414, I'm changing our behavior to use <div> as a line separator. This matches Blink/WebKit.
So if you have the text "foobar" and hit Enter in between the "foo" and the "bar", previously you would get "foo<br>bar", and soon you will get "<div>foo</div><div>bar</div>". The defaultParagraphSeparator command can be used to change the separator to "p" instead (which matches Edge's default behavior last I checked). Pages or embedders that want to keep the old behavior can run the following command: document.execCommand("defaultParagraphSeparator", false, "br"). This change is not likely to affect high-profile sites that use rich-text editing (webmail etc.), because due to browser incompatibility, these sites all override this behavior anyway. Our new behavior is as specified in the essentially unmaintained editing specification that I wrote several years ago, and tested by the web-platform-tests editing suite. (Except that the "br" value to defaultParagraphSeparator is unspecified, and is a Mozilla-specific extension for backwards compatibility.) _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform