59 bytes, text/x-review-board-request
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 Steps to reproduce: We're going here https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Editable_content And read about brand new and consistent rules for markup generation within contenteditable divs in modern browrsers: "Fortunately, in modern browsers things are somewhat more consistent. As of Firefox 55, Firefox has been updated to wrap the separate lines in <div> elements, matching the behavior of Chrome, modern Opera, Edge, and Safari." But lets try the form on that exact page? Lets enter some data, than hit Enter, than more data, Enter once again, etc. Actual results: <div contenteditable="true"> This text can be edited by the user. <br> kjnjnkjnk <br> jnkljk <br> </div> Expected results: <div contenteditable="true"> This text can be edited by the user. <div>kjnjnkjnk<br></div> <div>jnkljk<br></div> <div><br></div> </div> (like Chrome does)
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0 Build ID 20180118012136 Hi mega.venik, I was able to reproduce the issue you are experiencing on the latest Firefox Release (57.0.4) and on Firefox Beta 58.0b15 but not on Firefox Beta 59.0b1 and Nightly 59.0a1. It seems that this feature is behind a pref (Bug 1354060, "editor.use_div_for_default_newlines") and it's been set up in such a way that it's turned off if you are in Release or in late Beta and turned on in early Beta or Nightly. :masayuki, could you please confirm if this is indeed the desired behavior?
Yes. The best way of web apps about avoiding this compatibility issue is, calling |document.execCommand("defaultParagraphSeparator", false, "p");| or |document.execCommand("defaultParagraphSeparator", false, "div");| makes all browsers (except IE and Safari) use same default paragraph separator. Ideally, we can enable it on 60 or 61 because even if we change the default settings now, Editor staff don't have much time to investigate new web compat reports.
Priority: -- → P3
Firefox 60 is the next ESR version. And we have only one regression from Nightly testers, that is bug 1406726. So, we should fix bug 1406726 first, though, we should enable the standardized defaultParagraphSeparator in the release channel too.
Assignee: nobody → masayuki
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → All
Summary: Latest FireFox still uses <br> within contenteditable div to separate lines → Make defaultPargraphSeparater <div> in release build
Comment on attachment 8950848 [details] Bug 1430551 - Make editor use <div> as defaultParagraphSeparator even in release channel https://reviewboard.mozilla.org/r/220084/#review226376
Attachment #8950848 - Flags: review?(m_kato) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/f070cbe87295 Make editor use <div> as defaultParagraphSeparator even in release channel r=m_kato
I updated https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Editable_content#Differences_in_markup_generation
Posted the site compatibility note: https://www.fxsitecompat.com/en-CA/docs/2018/rich-text-editor-s-newline-behaviour-has-been-changed-now-generates-div-instead-of-br/
a year ago
Depends on: 1435123
Depends on: 1486513
You need to log in before you can comment on or make changes to this bug.