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

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 <masayuki@d-toybox.com>
Software Engineer, Mozilla
0
Masayuki
2/14/2018 4:14:31 AM
mozilla.dev.platform 6190 articles. 0 followers. Post Follow

0 Replies
4 Views

Similar Articles

[PageSpeed] 25

Reply: