-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block new line inside list item no longer breaks list structure #2501
Conversation
Rebased onto latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is one hypothetical situation, in which this fix won't work. Imagine editor with CKEDITOR.ENTER_P
enter mode, but with added div
plugin. Content is copied from some trashy source (be it even Word!) and something like that is pasted into the editor:
<ul>
<li>
foo
<div><br></div>
</li>
</ul>
In such case pressing Enter inside div
will delete the whole list item instead of adding new list item.
@@ -0,0 +1,20 @@ | |||
@bender-tags: 4.11.0, bug, 2205 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update version tag.
f9f9129
to
764ad73
Compare
If I'm right the issue can be easily resolved by dropping block element type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I've added changelog entry as it was missing.
What is the purpose of this pull request?
Bug fix
Does your PR contain necessary tests?
All patches which change the editor code must include tests. You can always read more
on PR testing,
how to set the testing environment and
how to create tests
in the official CKEditor documentation.
This PR contains
What changes did you make?
The fix could be as easy as skipping whole list moving inside
enterkey
plugin when block item is a placeholder (new line added for block elements, without it you cannot create new list item by an enter key). Although, it causes an issue where block tag style is copied into following list items, which is unwanted behavior in this special use case.Be aware that this fix doesn't creating break empty lines inside list item. They still can be added using
shift+enter
keystroke which createsbr
tags in the same node and in the result are not touched by the fix.Closes #2205