Opened 8 years ago
Last modified 8 years ago
#16948 new Bug
Adding a list removes preceding empty line with enterMode = CKEDITOR.ENTER_BR
Reported by: | Claas Augner | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Lists | Version: | 4.7.0 |
Keywords: | Cc: |
Description
Problem
When using the CKEDITOR.ENTER_BR
enterMode, adding a (numbered or bulleted) list after an empty line removes this preceding line.
Steps to reproduce
Step 1: Go to http://sdk.ckeditor.com/samples/enterkey.html
Step 2: Choose When Enter
is pressed: Break the line with a <br>
(Screenshot 1)
Step 3: Add the following text:
Line before empty line First item
(Screenshot 2)
Step 4: Move the cursor to the line containing First item and press:
(Screenshot 3)
(Screenshot 4)
Expected behavior: A list is created with First item as its first item, leaving the preceding line intact. Actual behavior: The list is created, but the preceding line is removed (*).
(*) Note that in the example there is a margin between the first line and the list, so that the removal of the line is not necessarily noticable (especially in the example):
(Screenshot 5)
Solutions
The behavior of adding a list (same holds for indentation using the indentblock plug-in) should be changed so that it does not remove a preceding empty line.
It might be desirable to make this behavioral change configurable in order to maintain backward-compatibility.
Attachments (5)
Change History (6)
Changed 8 years ago by
Attachment: | 4437082a-1496-11e7-93c5-e2222beb6a41.png added |
---|
comment:1 Changed 8 years ago by
Marek wrote on GitHub:
As for this issue I don't see a strong reason why you'd need a <br> before list, since lists are by definition a block elements, and as such require line break. But that's something that should be discussed on Trac.
Note that converting First item to a list has the same result for the following inputs:
Line before empty line First item
Both basically result in this (leaving aside CSS styling):
Line before empty line - First item
However, I would argue that in the first example the user's intension was to separate the Line before empty line from the list explicitly by one empty line.
Screenshot 1