Open Bug 1237563 Opened 10 years ago Updated 5 years ago

Line-break using "
" in contentEditable does not move cursor to new line

Categories

(Core :: DOM: Editor, defect, P5)

43 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: bk, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36 Steps to reproduce: if (e.keyCode === ENTER_KEY) { e.preventDefault(); document.execCommand('insertHTML', false, '
'); } Actual results: It acts like a line feed, but no carriage return. I also tried \r\n and got the same behavior. It seems impossible to do a carriage return. Expected results: Cursor moves to newline like a regular ENTER_KEY in textarea.
Component: Untriaged → Editor
Product: Firefox → Core
Summary: Line-break using 
 in contentEditable does not move cursor to new line → Line-break using "
" in contentEditable does not move cursor to new line
Could you attach a testcase, please. Did it use to work in old versions of Firefox?
Flags: needinfo?(bk)
This is the first version I try. Here is a test-case: https://jsfiddle.net/0gkfo2to/ In chrome it works as expected. In IE edge it doesn't work at all.
Flags: needinfo?(bk)
For the test-case, try typing in the div, then pressing enter once or more times, then typing again.

Bulk-downgrade of unassigned, untouched DOM/Storage bug's priority.

If you have reason to believe, this is wrong, please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.