contenteditable should not replace linebreaks by <br> inside a <pre>
Categories
(Core :: DOM: Editor, defect, P3)
Tracking
()
People
(Reporter: glazou, Unassigned)
References
(Blocks 4 open bugs)
Details
(Keywords: parity-chrome, parity-safari, topembed-, Whiteboard: [rules] EDITORBASE- webcompat:risk-moderate )
Comment 1•24 years ago
|
||
Reporter | ||
Comment 3•24 years ago
|
||
Comment 5•24 years ago
|
||
Reporter | ||
Comment 7•24 years ago
|
||
Reporter | ||
Comment 8•24 years ago
|
||
Reporter | ||
Comment 9•23 years ago
|
||
Comment 10•23 years ago
|
||
Comment 11•23 years ago
|
||
Reporter | ||
Comment 12•23 years ago
|
||
Comment 13•23 years ago
|
||
Comment 15•23 years ago
|
||
Comment 17•23 years ago
|
||
Comment 18•23 years ago
|
||
Comment 19•23 years ago
|
||
Comment 20•23 years ago
|
||
Comment 21•23 years ago
|
||
Comment 22•23 years ago
|
||
Comment 23•23 years ago
|
||
Comment 24•23 years ago
|
||
Comment 25•22 years ago
|
||
Comment 26•22 years ago
|
||
Comment 27•22 years ago
|
||
Comment 28•21 years ago
|
||
Comment 29•21 years ago
|
||
Comment 30•19 years ago
|
||
Comment 31•19 years ago
|
||
Reporter | ||
Comment 32•19 years ago
|
||
Comment 33•19 years ago
|
||
Comment 34•19 years ago
|
||
Comment 35•19 years ago
|
||
Comment 36•19 years ago
|
||
Reporter | ||
Comment 37•19 years ago
|
||
Comment 38•19 years ago
|
||
Comment 39•19 years ago
|
||
Comment 40•19 years ago
|
||
Updated•18 years ago
|
Comment 41•14 years ago
|
||
Reporter | ||
Comment 42•14 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 45•5 years ago
|
||
Note that Chrome inserts <div>
instead of <br>
.
Updated•5 years ago
|
Comment 46•4 years ago
|
||
(In reply to Kagami :saschanaz from comment #45)
Note that Chrome inserts
<div>
instead of<br>
.
Odd. I tested this with Chrome 91, chrome inserts another <pre>
for insertParagraph
(Enter
key press).
And insert \n
for insertLineBreak
instead of <br>
(Shift
+ Enter
key press).
Perhaps, for comm-central products, we should add an API to keep current behavior for insertParagraph
, but we should follow the Chrome's behavior for web-compat by default.
Comment 47•4 years ago
|
||
Safari behaves similarly to Chrome. So, we should align the behavior.
![]() |
||
Updated•3 years ago
|
![]() |
||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 48•3 years ago
|
||
The severity field for this bug is set to S3. However, this bug has a P1 WebCompat priority.
:masayuki, could you consider increasing the severity of this web compatibility bug?
For more information, please visit auto_nag documentation.
Comment 49•3 years ago
|
||
If this breaks some web apps in the wild, yes, we should make this at least P2 and I'd work on this immediately.
twisniewski: Do you know such web apps?
Comment 50•3 years ago
|
||
I don't know of specific modern web apps off the top of my head, no. I think the P1 priority can be downgraded if there are more important contenteditable bugs to work on first.
Comment 51•3 years ago
|
||
Asking for downgrading webcompat-priority per comment 49 and comment 50
Comment 52•3 years ago
|
||
The severity field for this bug is relatively low, S3. However, the bug has 12 votes.
:hsinyi, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 53•2 years ago
|
||
I have run into this issue as well and it was a source of a difficult to detect bug. As said earlier, both Safari and Chromium preserve newlines and Firefox should do the same. The current behavior creates an inconsistency in every website that uses a contenteditable-based text editor, which is common (in my case it was TinyMCE 5), when inserting preformatted text as the resulting content from the editor will be different between browsers, leading to unexpected scenarios. Due to this, I think the issue priority should be increased.
Updated•3 months ago
|
Description
•