Ticket #1519 (new Bug)

Opened 13 months ago

Last modified 5 months ago

Bulleted list on doesn't work properly for selected lines

Reported by: PavelZ Owned by: fredck
Priority: Normal Milestone: CKEditor 3.0
Component: Core : Lists Version: FCKeditor 2.5 Beta
Keywords: Confirmed Review- 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

1519.patch (4.2 KB) - added by martinkou 8 months ago.
1519_2.patch (4.2 KB) - added by martinkou 7 months ago.
1519_3.patch (4.5 KB) - added by martinkou 7 months ago.
1519_PartialFix.patch (1.0 KB) - added by fredck 5 months ago.

Change History

Changed 13 months ago by fredck

  • keywords Bulleted list removed
  • milestone changed from FCKeditor 2.5 to FCKeditor 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).

Changed 13 months 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.

Changed 10 months ago by w.olchawa

  • keywords Confirmed added

Changed 9 months ago by fredck

  • milestone changed from FCKeditor 2.6 to FCKeditor 2.6.1

Changed 8 months ago by martinkou

  • owner set to martinkou
  • status changed from new to assigned

Changed 8 months ago by martinkou

Changed 8 months ago by martinkou

  • keywords Review? added

Changed 7 months ago by martinkou

Changed 7 months ago by martinkou

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

Changed 7 months ago by alfonsoml

  • 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 7 months ago by martinkou

Changed 7 months ago by martinkou

  • 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.

Changed 7 months ago by fredck

  • 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.

Changed 7 months ago by fredck

  • owner changed from martinkou to fredck
  • status changed from assigned to new

Changed 5 months ago by julia82

I'm interested in getting news!

Changed 5 months ago by fredck

Changed 5 months ago by fredck

  • milestone changed from FCKeditor 2.6.3 to CKEditor 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.

Note: See TracTickets for help on using tickets.