Opened 4 years ago

Last modified 4 years ago

#13740 confirmed Bug

Decreasing indention in a multiple indentation list

Reported by: vosmanz Owned by:
Priority: Normal Milestone:
Component: Core : Lists Version: 4.0
Keywords: Cc: ruud@…

Description

Steps to reproduce

  1. Go to http://ckeditor.com/demo
  2. Replace the source code in the editor to:
    <ul>
    	<li>Test
    	<ul>
    		<li>Line 1</li>
    		<li>Line 2</li>
    	</ul>
    	Test</li>
    </ul>
    
  3. Place the cursor at the end of 'Line 2' and click the decrease indent button ('Inspringing verkleinen' in Dutch, not sure what the exact English label is)

Expected result

The indentation is decreased, and 'Line 2' is now at the same level as 'Test', on the same line-position as it was before.

Actual result

The indentation is decreased, but 'Line 2' is now at the end of the first UL.

Additional problem

The cursor is now still at the end of 'Line 2'. When you press the decrease indent button again, 'Line 2' is placed at the beginning of the line, but the second 'Test' text is now placed at the top, so that text now is 'Test Test'.

Other details (browser, OS, CKEditor version, installed plugins)

OS: Win8.1 x64 (Dutch language) Browsers (tested and reproduced):

  • Internet Explorer 11.0.9600.18036 (updateversion 11.0.23)
  • Chrome 45.0.2454.85 m (64-bit)
  • Firefox 40.0.3
  • Opera 31.0.1889.174

CKEditor:

  • Discovered in 4.5.2 (custom build)
  • Reproduced in 4.5.3 (Standard)(using ckeditor.com/demo)
  • Not sure if it occured in earlier versions.

Change History (4)

comment:1 Changed 4 years ago by vosmanz

Today I heard that the content was made in Microsoft Word, and then pasted into CKEditor (probably in an earlier version, but I'm unable to find out what version of CKEditor was used when the text was pasted). Unfortunately, I don't have the original Word document.

comment:2 Changed 4 years ago by Piotrek Koszuliński

Status: newconfirmed
Version: 4.5.24.0

Today I heard that the content was made in Microsoft Word

That's an important fact. You wouldn't be able to create such list with CKEditor so that justifies a bit why CKEditor does not handle it properly.

In my opinion the expected HTML is:

<ul>
	<li>Test
	<ul>
		<li>Line 1</li>
	</ul>
	<p>Line 2</p>
	Test</li>
</ul>

That's what would happen if the Line1+Line2 list was alone – the second line would be turned into a paragraph. However, this creates an uncool situation where "Test" isn't a paragraph and "Line2" is, so it would be good to turn "Test" into paragraph as well. Actually, it should be a paragraph from the beginning.

And here we get to the point – to resolve this problem we would need to change the approach to creating and pasting lists. There should always be paragraphs inside list items so when a list item has more than one block there's no inconsistency.

I'm confirming this issue, but I'm not sure whether we'll be able to do anything about it in CKEditor 4. In CKEditor 5 I think we'll make the conceptual change which I described above what should resolve such problems automatically.

comment:3 Changed 4 years ago by vosmanz

Thank you for your reply Reinmar.

I didn't think it was related to this bug because I could reproduce it in the demo as well, but our editor is set to enterMode = CKEDITOR.ENTER_BR. So in that case, wrapping it in paragraphs I think is unwanted behaviour, right? If I validate the HTML code in the W3C validator, it seems valid also without wrapping it with a <p> tag.

comment:4 Changed 4 years ago by Piotrek Koszuliński

Enter mode BR is not recommended and it will be dropped as it creates countless situations in which is hard to make a reasonable decision. Being valid in terms of HTML is one thing. Being valid in terms of semantics and editability is second thing and this is much harder and requires some specific, strict rules like the ones we already mentioned here.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy