Opened 12 years ago

Closed 8 years ago

#1519 closed Bug (worksforme)

Bulleted list on doesn't work properly for selected lines

Reported by: PavelZ Owned by: Frederico Caldeira Knabben
Priority: Normal Milestone:
Component: Core : Lists Version: FCKeditor 2.5 Beta
Keywords: Cc:

Description

In fck do: aaaaaaaa
<Shift+Enter>
bbbbbbb
<Shift+Enter>
cccccccc

Place the cursor at the beginning of the document and press <Shift+DownArrow> twice. Two lines of text ale selected. Press "Bulleted list" button. Also the third line (cccccccc) is bulleted

Tested in FCK demo (ver. 2.5 Beta Build 16848) in both FF and IE.

Attachments (4)

1519.patch (4.2 KB) - added by Martin Kou 12 years ago.
1519_2.patch (4.2 KB) - added by Martin Kou 12 years ago.
1519_3.patch (4.5 KB) - added by Martin Kou 12 years ago.
1519_PartialFix.patch (1000 bytes) - added by Frederico Caldeira Knabben 11 years ago.

Download all attachments as: .zip

Change History (20)

comment:1 Changed 12 years ago by Frederico Caldeira Knabben

Keywords: Bulleted list removed
Milestone: FCKeditor 2.5FCKeditor 2.6

The fact here is that the selection touches the third line too, which seems logic. If you are in the first line and moves two times down, you should expect to be in the third line.

The problem here is the way browsers render the selection in this case. They simply don't render anything in the third line because we have an empty selection there (which would be blinking in a collapsed selection).

comment:2 Changed 12 years ago by PavelZ

I would expect the same behaviour as in MS Word.

If the cursor is at the beginnig of the first line and <Shift+DownArrow> is pressed than the cursor is in the second line, but only the first line is selected.

comment:3 Changed 12 years ago by Wojciech Olchawa

Keywords: Confirmed added

comment:4 Changed 12 years ago by Frederico Caldeira Knabben

Milestone: FCKeditor 2.6FCKeditor 2.6.1

comment:5 Changed 12 years ago by Martin Kou

Owner: set to Martin Kou
Status: newassigned

Changed 12 years ago by Martin Kou

Attachment: 1519.patch added

comment:6 Changed 12 years ago by Martin Kou

Keywords: Review? added

Changed 12 years ago by Martin Kou

Attachment: 1519_2.patch added

comment:7 Changed 12 years ago by Martin Kou

I've updated the patch because I found a small mistake in the previous patch.

comment:8 Changed 12 years ago by Alfonso Martínez de Lizarrondo

Keywords: Review- added; Review? removed

In Firefox 2 and Opera it's fine in my tests

It doesn't seems to work in Safari 3.1 (windows at least)

in IE, (this problem exists before the patch, so it probably should be filed as a different ticket, but just to make it clear that it isn't a regression) the selection is lost after removing the list. It only happens when selecting the lines with the keyboard.

Can you check the Safari thing?

Changed 12 years ago by Martin Kou

Attachment: 1519_3.patch added

comment:9 Changed 12 years ago by Martin Kou

Keywords: Review? added; Review- removed

Confirmed the Safari bug in the previous patch. It is caused by the

if ( FCKListsLib.BlockElements[ currentNode ] )

line towards the end of FCKDomRange::Trim(). It should be FCKListsLib.BlockElements[ currentNode.nodeName.toLowerCase() ] instead.

The IE/remove list issue should belong to another ticket.

comment:10 Changed 12 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

I think a simpler solution could be found. Also, probably the correct place to fix is DomRangeIterator, making it ignoring the last paragraph in that case. I'll be working on this.

comment:11 Changed 12 years ago by Frederico Caldeira Knabben

Owner: changed from Martin Kou to Frederico Caldeira Knabben
Status: assignednew

comment:12 Changed 11 years ago by Julia

I'm interested in getting news!

Changed 11 years ago by Frederico Caldeira Knabben

Attachment: 1519_PartialFix.patch added

comment:13 Changed 11 years ago by Frederico Caldeira Knabben

Milestone: FCKeditor 2.6.3CKEditor 3.0

I've been working on a simple fix for this one. I was almost there, bug found out that the current range iterator have some limitations that make it impossible to have a complete fix for it.

I still think that's the way to go for it, but I'm postponing it to V3 so we can calmly rework the range iterator to manage this situation properly.

comment:14 Changed 11 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.0CKEditor 3.x

comment:15 Changed 9 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.x

Milestone CKEditor 3.x deleted

comment:16 Changed 8 years ago by Frederico Caldeira Knabben

Resolution: worksforme
Status: review_failedclosed

This has been fixed on the current trunk and should be available on CKEditor 3.6.2.

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