Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intent to enable <div> as default paragraph separator of contenteditable/designMode editor by default

643 views
Skip to first unread message

Masayuki Nakano

unread,
Feb 13, 2018, 11:15:13 PM2/13/18
to dev-pl...@lists.mozilla.org
Starting from Firefox 60, I'd like to enable <div> as default paragraph
separator of contenteditable/designMode editor by default even in
release channel.

When user typing Enter key in editing host (or body in designMode),
Firefox 59 and earlier insert <br> element. However, the other browsers
insert <div> element (and wraps current line with <div> too). This is
declared by execCommand spec (Unofficial draft):
https://w3c.github.io/editing/execCommand.html#the-insertparagraph-command

We've already enabled this behavior on Nightly and Early Beta since
Firefox 55:
https://bugzilla.mozilla.org/show_bug.cgi?id=1297414

And now, we don't have confirmed regression reports which we haven't
worked on. Additionally, once we use same behavior with the other
browsers in this major difference, new web services could becomes not
supporting our current behavior. That means ESR users may become not to
be able to use such web services. Therefore, I'd like to enable this
before shipping ESR 60.

The bug is:
https://bugzilla.mozilla.org/show_bug.cgi?id=1430551

Note that even if some web services have trouble with new our behavior,
they can take the old behavior with inserting this line:

document.execCommand("defaultParagraphSeparator", false, "br");

--
Masayuki Nakano <masa...@d-toybox.com>
Software Engineer, Mozilla

Jet Villegas

unread,
Feb 14, 2018, 3:40:55 PM2/14/18
to Masayuki Nakano, dev-pl...@lists.mozilla.org
SGTM. Please follow up to make sure this workaround makes it on to MDN:

> document.execCommand("defaultParagraphSeparator", false, "br");

Thx!


On Tue, Feb 13, 2018 at 8:14 PM, Masayuki Nakano <masa...@d-toybox.com>
wrote:
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>

Masayuki Nakano

unread,
Feb 16, 2018, 3:04:50 AM2/16/18
to j...@mozilla.com, dev-pl...@lists.mozilla.org
On 2/15/2018 5:40 AM, Jet Villegas wrote:
> SGTM. Please follow up to make sure this workaround makes it on to MDN:
>
>> document.execCommand("defaultParagraphSeparator", false, "br");
>
> Thx!

Hi, Jet-san, I updated the document in MDN:
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Editable_content#Differences_in_markup_generation
0 new messages