Skip to content
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

Backspace at first LI should not merge with previous block #2987

Closed
fredck opened this issue Jul 12, 2017 · 2 comments · Fixed by ckeditor/ckeditor5-list#83
Closed

Backspace at first LI should not merge with previous block #2987

fredck opened this issue Jul 12, 2017 · 2 comments · Fixed by ckeditor/ckeditor5-list#83
Assignees
Labels
package:list type:improvement This issue reports a possible enhancement of an existing feature.
Milestone

Comments

@fredck
Copy link
Contributor

fredck commented Jul 12, 2017

Starting HTML:

<p>Text in paragraph</p>
<ol>
    <li>^Item 1</li>
    <li>Item 2</li>
</ol>

Current results after Backspace:

<p>Text in paragraph^Item 1</p>
<ol>
    <li>Item 2</li>
</ol>

Expected results:

<p>Text in paragraph</p>
<p>^Item 1</p>
<ol>
    <li>Item 2</li>
</ol>
@Reinmar
Copy link
Member

Reinmar commented Jul 12, 2017

The same feature is required for the block quote feature.

@Reinmar
Copy link
Member

Reinmar commented Oct 11, 2017

To better describe what needs to be done:

  • add listener to delete event on the view document,
  • when in the first item of a list, outdent this item and prevent default.

The same needs to be done with the block quote feature.

Example of a custom Enter handling in the list feature: https://github.com/ckeditor/ckeditor5-list/blob/master/src/list.js#L52-L62.

Reinmar referenced this issue in ckeditor/ckeditor5-list Nov 10, 2017
Fix: Pressing <kbd>Backspace</kbd> at the beginning of a first list item will turn it into a paragraph instead of merging with the previous block. Closes #68.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-list Oct 9, 2019
@mlewand mlewand added this to the iteration 13 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:improvement This issue reports a possible enhancement of an existing feature. package:list labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:list type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants