Opened 10 years ago

Closed 10 years ago

#6297 closed Bug (fixed)

Unexpected behavior when toggling bulleted/numbered list with a floating element

Reported by: Pablo Vanwoerkom Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.4.3
Component: Core : Lists Version: 3.4
Keywords: IBM Cc: jamcunni@…

Description (last modified by Krzysztof Studnik)

Enter the following in the ckeditor.

<p>
	paragraph 1 with float left image <img src="http://a.cksource.com/c/1/inc/img/logo-ckfinder.gif" style="float: left;" /></p>
<p>
	paragraph 2</p>
<p>
	paragraph 3</p>
  1. Select all text and then hit the bulleted/numbered list button. This will move the image into it's own bullet, separated from paragraph
  2. If you click on a list button again, the image is now in it's own paragraph.
  3. If you click it again, the image will disappear and its atrributes will get moved to the <li> tag and the bullet will just contain a &nbsp;.

This was tested in Firefox 3.5.

Attachments (4)

krst_18.09.36.png (30.5 KB) - added by Krzysztof Studnik 10 years ago.
6297.patch (2.8 KB) - added by Martin 10 years ago.
6297_rev.patch (909 bytes) - added by Martin 10 years ago.
Purpose of patch.
6297_2.patch (1.1 KB) - added by Garry Yao 10 years ago.

Download all attachments as: .zip

Change History (22)

comment:1 Changed 10 years ago by Pablo Vanwoerkom

Version: 3.4

Changed 10 years ago by Krzysztof Studnik

Attachment: krst_18.09.36.png added

comment:2 Changed 10 years ago by Krzysztof Studnik

Component: GeneralCore : Lists
Description: modified (diff)
Keywords: Firefox added; bullets float elements numbered list removed
Status: newconfirmed

Confirmed in CKE3.4.1, Firefox 3.6.10 result of above operations:

<ul>
	<li>
		paragraph 1 with float left image</li>
	<li src="http://a.cksource.com/c/1/inc/img/logo-ckfinder.gif" style="float: left;">
		&nbsp;</li>
	<li>
		&nbsp;</li>
	<li>
		paragraph 2</li>
	<li>
		paragraph 3</li>
</ul>

comment:3 Changed 10 years ago by Krzysztof Studnik

linked with #6429

comment:4 Changed 10 years ago by James

Cc: jamcunni@… added

comment:5 Changed 10 years ago by James

Keywords: IBM added

comment:6 Changed 10 years ago by Martin

Owner: set to Martin
Status: confirmedassigned

comment:7 Changed 10 years ago by Martin

Keywords: Opera Safari added

Changed 10 years ago by Martin

Attachment: 6297.patch added

comment:8 Changed 10 years ago by Martin

Status: assignedreview

comment:9 Changed 10 years ago by Garry Yao

Keywords: Firefox Opera Safari removed
Milestone: CKEditor 3.5
Status: reviewreview_failed

We should change element::isBlockBoundary method, as it's also used in other places.

comment:10 Changed 10 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.5CKeditor 3.4.3

Changed 10 years ago by Martin

Attachment: 6297_rev.patch added

Purpose of patch.

comment:11 Changed 10 years ago by Martin

Status: review_failedreview

comment:12 Changed 10 years ago by Garry Yao

Status: reviewreview_failed

Well, it looks unreasonable to determinate display mode from elements structure.

Changed 10 years ago by Garry Yao

Attachment: 6297_2.patch added

comment:13 Changed 10 years ago by Martin

Status: review_failedreview

comment:14 Changed 10 years ago by Tobiasz Cudnik

Status: reviewreview_failed

The problem with an attribute migration is solved by second patch. Although on Webkit there's created a new, empty LI after each list & unlinst operations. When we remove the image from the TC, this behavior is gone, so it may be related.

comment:15 in reply to:  14 Changed 10 years ago by Garry Yao

Owner: changed from Martin to Garry Yao
Status: review_failedreview

Replying to tobiasz.cudnik:

The problem with an attribute migration is solved by second patch. Although on Webkit there's created a new, empty LI after each list & unlinst operations. When we remove the image from the TC, this behavior is gone, so it may be related.

WFM on webkit with the ticket test, what exactly do you see there?

comment:16 Changed 10 years ago by Tobiasz Cudnik

  1. Use the following content with the selection:
    [<p>
    	paragraph 1 with float left image <img src="http://a.cksource.com/c/1/inc/img/logo-ckfinder.gif" style="float: left;" /></p>
    <p>
    	paragraph 2</p>
    <p>
    	paragraph 3</p>]
    
  2. Apply the List command.
  3. Apply the List command.

Expected: Same as in a point 1.

Result:

<p>
	paragraph 1 with float left image</p>
<p>
	<img src="http://a.cksource.com/c/1/inc/img/logo-ckfinder.gif" style="float: left;" /></p>
<p>
	paragraph 2</p>
<p>
	paragraph 3</p>

comment:17 Changed 10 years ago by Tobiasz Cudnik

Status: reviewreview_passed

Ok, it's fine, i had a wrongly patched version.

comment:18 Changed 10 years ago by Garry Yao

Resolution: fixed
Status: review_passedclosed

Fixed with [6113].

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