Opened 14 years ago

Last modified 14 years ago

#6173 confirmed Bug

Removing Items from unordered list (WinXP/IE8)

Reported by: tom Owned by:
Priority: Normal Milestone:
Component: General Version: 3.3.2
Keywords: IE Discussion Cc: pomu@…

Description (last modified by Tobiasz Cudnik)

I've got a problem with unordered / numbered lists with IE8 on WindowsXP.

  • Create an unordered list with some items.
  • Now try to get one item to the upper line with the "delete"-key.
  • This will not work.
  • If you try the "backspace"-key on the line that should be added to the item above you got an inconsistent list, because the </li>-Tag of the upper line will not disappear.

This error is not in Firefox3 (WinXP), but IE8 (Windows7)

This is also the case in http://ckeditor.com/demo/

Attachments (6)

TestList.doc (22.5 KB) - added by tom 14 years ago.
Testlist in Word-Format
6173.patch (1.9 KB) - added by Paweł Horzela 14 years ago.
Patch
6173_2.patch (5.7 KB) - added by Paweł Horzela 14 years ago.
Patch
6173_3_rev.patch (6.4 KB) - added by Paweł Horzela 14 years ago.
Patch
6173_4_rev.patch (6.3 KB) - added by Paweł Horzela 14 years ago.
Patch
6173_5.patch (5.3 KB) - added by Garry Yao 14 years ago.

Download all attachments as: .zip

Change History (27)

Changed 14 years ago by tom

Attachment: TestList.doc added

Testlist in Word-Format

comment:1 Changed 14 years ago by Tobiasz Cudnik

Description: modified (diff)
Keywords: IE added
Milestone: CKEditor 3.5
Status: newconfirmed

comment:2 Changed 14 years ago by tom

This Bug is only with IE8 on WindowsXP!

IE8 on Windows7 works fine.

comment:3 Changed 14 years ago by Paweł Horzela

Owner: set to Paweł Horzela
Status: confirmedassigned

comment:4 Changed 14 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.5CKeditor 3.4.3

Changed 14 years ago by Paweł Horzela

Attachment: 6173.patch added

Patch

comment:5 Changed 14 years ago by Paweł Horzela

Status: assignedreview

comment:6 Changed 14 years ago by Garry Yao

Status: reviewreview_failed

This patch is our first "delete" key handling logic, and looks really good. I'm not trying to make things complicated but while we should consider the following thing:

  1. Apply it for other browsers as well? e.g. Firefox generally works well while stuck will the following case on "del":
    <ol>
    	<li>
    		<p>
    			item1^</p>
    	</li>
    	<li>
    		item2</li>
    </ol>
    
  2. The merging result after "del" in the above list should be the following instead:
    <ol>
    	<li>
    		<p>
    			item1item2</p>
    	</li>
    </ol>
    
  3. Nested list should be considered as well, generally "del" and "backspace" merge the first list item of sub list, then remove the list if empty;

Changed 14 years ago by Paweł Horzela

Attachment: 6173_2.patch added

Patch

comment:7 Changed 14 years ago by Paweł Horzela

Status: review_failedreview

comment:8 Changed 14 years ago by Garry Yao

Status: reviewreview_failed

Looks good, fails for the following cases on "Backspace":

<ul>
	<li><p>paragraph1</p>
		<p>paragraph2</p>
		<ul>
			<li>^inner item1</li>
		</ul>
	</li>
</ul>

comment:9 Changed 14 years ago by Garry Yao

And the following points:

  1. Cache intermediate element when possible (there's no releaser optimization there);
  2. Undo/Redo should work as well;
  3. innerPrevious/innerNext must be well checked to be valid for reception new children.

comment:10 Changed 14 years ago by Tobiasz Cudnik

I would also add that those long lines could be splitted into multiline statements for a better readability.

Changed 14 years ago by Paweł Horzela

Attachment: 6173_3_rev.patch added

Patch

comment:11 Changed 14 years ago by Paweł Horzela

Status: review_failedreview

comment:12 Changed 14 years ago by pomu0325

Cc: pomu@… added

comment:13 Changed 14 years ago by Garry Yao

Status: reviewreview_failed

Have the following content and selection press "Backspace":

<ol>
	<li>
		<p>
			item1</p>
		<ol>
			<li>
				<h1>
					^item21</h1>
				<h1>
					item22</h1>
			</li>
		</ol>
	</li>
</ol>

Actual Result:

<ol>
	<li>
		<p>
			item1</p>
		<h1>
			item22</h1>
	</li>
</ol>

Expected Result:

<ol>
	<li>
		<p>
			item1item21</p>
		<ol>
			<li>
				<h1>
					item22</h1>
			</li>
		</ol>
	</li>
</ol>

Changed 14 years ago by Paweł Horzela

Attachment: 6173_4_rev.patch added

Patch

comment:14 Changed 14 years ago by Paweł Horzela

Status: review_failedreview

comment:15 Changed 14 years ago by Garry Yao

Status: reviewreview_failed

There's still lots of problems with the latest patch, I'm now taking over this ticket.

Changed 14 years ago by Garry Yao

Attachment: 6173_5.patch added

comment:16 Changed 14 years ago by Garry Yao

Owner: changed from Paweł Horzela to Garry Yao
Status: review_failedreview

comment:17 Changed 14 years ago by Tobiasz Cudnik

Status: reviewreview_failed

I have two points for the latest patch:

  1. Following TC, already mentioned in comment 13 - IE8, use the content below, hit Backspace, nothing happens:
    <ol>
    	<li>
    		<p>
    			item1</p>
    		<ol>
    			<li>
    				<h1>
    					^item21</h1>
    				<h1>
    					item22</h1>
    			</li>
    		</ol>
    	</li>
    </ol>
    
  2. I think all logic common to every instance of the editor shouldn't be placed inside an init function, as it's duplicated for every instance. This includes:
  • mergeListItems
  • doDelete
  • keydown listener

comment:18 Changed 14 years ago by Garry Yao

Status: review_failedreview
  1. The TC WFM by having the nested list outdented, we could discuss though whether it's a good design.
  2. Those are closures scoped to the editor by design.

comment:19 Changed 14 years ago by Tobiasz Cudnik

Status: reviewreview_passed

It seems i've been having some cache issues, now i'm getting proper results with attached TC. I agree with the outdent approach for nested lists.

As it goes about closures, we don't need them there, the editor variable can be simply passed as a parameter, which would result in a reduced memory consumption in case of many editor instances.

comment:20 Changed 14 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.4.3
Owner: Garry Yao deleted
Status: review_passednew

Ok... I got a complete overview of the patch proposal. It's all interesting and I'm sure some good time has been spent on it. I'm even sorry to say that, but I think the approach to handle this situation was wrong. Let me expose some reasons:

  1. The ticket is related to an issue limited to IE8+XP. Considering that it works well with Win7, we could even expect it to work better on XP in the future (is MS still supporting XP?... anyway). In any case, it's a specific tc on a specific browser. Considering the number of other issues we have to get fixed, this would have less priority (it was a mistake to target it initially) and in any case the amount of code would not justify the fix.
  1. Garry came with a series of "edge cases". Of course, I would love to fix every single aspect of the editor behavior, but we must keep the editor size small. It's hard to justify the patch size because of the cases.
  1. Then again... the cases didn't come from the "real world". I mean, people out there opening tickets for them. It makes it even harder to justify the fix and its size.
  1. The solution proposed goes outside the ticket TC, being much broader. In fact it adds an important new feature into the editor, which should be handled in a dedicated ticket and even have an enlarged discussion to understand if we should introduce it now, and how to do that (avoiding many on the points in this list).

Other things to consider:

  1. The editor is already being considered huge on size. We must be aware to not bloat its code.
  1. We'll always have situations where to add a lot of code in the editor. We must be smart to decide when it's worth, and when it's not.
  1. We didn't leave the option to the end developer to decide whether to use or not this fix.

To conclude, let's have this patch remembered, so it could be part of a the potential keyboard handler we could work on the future. But considering all the above, we should not proceed with it right now.

comment:21 Changed 14 years ago by Garry Yao

Keywords: Discussion added
Status: newconfirmed
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