Opened 6 years ago

Closed 6 years ago

#6297 closed Bug (fixed)

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

Reported by: guikubivan 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 krst)

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 krst 6 years ago.
6297.patch (2.8 KB) - added by mani 6 years ago.
6297_rev.patch (909 bytes) - added by mani 6 years ago.
Purpose of patch.
6297_2.patch (1.1 KB) - added by garry.yao 6 years ago.

Download all attachments as: .zip

Change History (22)

comment:1 Changed 6 years ago by guikubivan

  • Version set to 3.4

Changed 6 years ago by krst

comment:2 Changed 6 years ago by krst

  • Component changed from General to Core : Lists
  • Description modified (diff)
  • Keywords Firefox added; bullets float elements numbered list removed
  • Status changed from new to confirmed

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 6 years ago by krst

linked with #6429

comment:4 Changed 6 years ago by james c

  • Cc jamcunni@… added

comment:5 Changed 6 years ago by james c

  • Keywords IBM added

comment:6 Changed 6 years ago by mani

  • Owner set to mani
  • Status changed from confirmed to assigned

comment:7 Changed 6 years ago by mani

  • Keywords Opera Safari added

Changed 6 years ago by mani

comment:8 Changed 6 years ago by mani

  • Status changed from assigned to review

comment:9 Changed 6 years ago by garry.yao

  • Keywords Firefox Opera Safari removed
  • Milestone set to CKEditor 3.5
  • Status changed from review to review_failed

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

comment:10 Changed 6 years ago by fredck

  • Milestone changed from CKEditor 3.5 to CKeditor 3.4.3

Changed 6 years ago by mani

Purpose of patch.

comment:11 Changed 6 years ago by mani

  • Status changed from review_failed to review

comment:12 Changed 6 years ago by garry.yao

  • Status changed from review to review_failed

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

Changed 6 years ago by garry.yao

comment:13 Changed 6 years ago by mani

  • Status changed from review_failed to review

comment:14 follow-up: Changed 6 years ago by tobiasz.cudnik

  • Status changed from review to review_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 6 years ago by garry.yao

  • Owner changed from mani to garry.yao
  • Status changed from review_failed to review

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 6 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 6 years ago by tobiasz.cudnik

  • Status changed from review to review_passed

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

comment:18 Changed 6 years ago by garry.yao

  • Resolution set to fixed
  • Status changed from review_passed to closed

Fixed with [6113].

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