Opened 11 years ago

Last modified 11 years ago

#9961 confirmed Bug

Webkit: Deleting empty list items result in BR inserted before text.

Reported by: dyland Owned by:
Priority: Normal Milestone:
Component: Core : Lists Version: 3.0
Keywords: Webkit Cc:

Description (last modified by Jakub Ś)

  1. In an empty editor, type "test"
  2. Click on the Numbered List button to make it a list.
  3. Move the cursor to before "test".
  4. Press Enter twice, so that now you have two empty list items, and the third one with "test".
  5. With the cursor still right before "test", click on Increase Indent button.
  6. Now, select the first two list items by double clicking on the first line and dragging into the second line. (See screenshot).
  7. Press delete.

Actual: Two bullets render on the first line (which is normal behaviour), the text appears on the second which is a bug. (See screenshot)

Attachments (2)

select first two items.png (5.0 KB) - added by dyland 11 years ago.
screenshot of selecting the first two list items
delete first two items.png (4.7 KB) - added by dyland 11 years ago.
screenshot after deleting the first two items

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by dyland

Attachment: select first two items.png added

screenshot of selecting the first two list items

Changed 11 years ago by dyland

Attachment: delete first two items.png added

screenshot after deleting the first two items

comment:1 Changed 11 years ago by dyland

This is Google Chrome, Version 24.0.1312.52, Mac OS 10.7.5.

comment:2 Changed 11 years ago by Jakub Ś

Description: modified (diff)
Keywords: Webkit added
Summary: deleting empty list items result in two bullets on the same lineWebkit: Deleting empty list items result in BR inserted before text.

comment:3 Changed 11 years ago by Jakub Ś

Status: newconfirmed
Version: 4.0.2 (GitHub - master)3.0

@dyland I have modified original TC because what you have described is simply how browsers behave.

Webkit shows it perfectly by highlighting the selection. What you do is select contents of 1st list element and second list element which after deletion will result in something you have described.
You will get the same in every browser and when using element with contenteditable="true" (with no editor logic). The only difference is that browser doesn't insert BR element after li like CKEditor does it in Webkit.

To summarize:

  1. You start with:
    <ol>
    	<li>&nbsp;</li>
    	<li>&nbsp;
    	<ol>
    		<li>test</li>
    	</ol>
    	</li>
    </ol>
    
  2. You make selection like in point 6 of original TC and press delete
  3. In Webkit using CKEditor you get:
    <ol>
    	<li>
    	<ol>
    		<li><br />
    		test</li>
    	</ol>
    	</li>
    </ol>
    

The only difference between native behaviour and CKEditor used in other browsers is this extra BR being inserted before "test".

Problem can be reproduced from CKEditor 3.0.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy