Ticket #1647 (closed Bug: fixed)

Opened 5 months ago

Last modified 2 months ago

Selecting a Format while in a Bulleted/Numbered list fails to make new Bullets/Numbers

Reported by: jonbrooks Assigned to: fredck
Priority: Normal Milestone: FCKeditor 2.6
Component: UI : Enter Key Version: SVN
Keywords: Confirmed Review+ Cc:

Description

This issue was related to bug 277 which is now fixed.

To Reproduce:

  • Create a Bulleted list
  • Select 'Heading 2'
  • Type some text, hit return

Result:

No new bullets appear. The only way to make new bullets is to position the cursor at the end of the document and create a new bulleted list.

Attachments

1647.patch (1.7 kB) - added by martinkou on 03/12/08 09:44:54.
1647_2.patch (2.0 kB) - added by martinkou on 03/14/08 08:49:02.
1647_3.patch (11.1 kB) - added by fredck on 03/14/08 15:47:21.

Change History

12/09/07 01:42:13 changed by jonbrooks

Additionally, IE has unexpected cursor behavior with these steps:

  • Create a Bulleted List
  • Type one line of text, hit return
  • Select 'Heading 2'

Result: Cursor position jumps to the previous bullet.

12/10/07 09:54:49 changed by martinkou

  • keywords set to Confirmed.
  • owner changed.
  • version set to SVN.
  • component changed from General to UI : Enter Key.
  • milestone set to FCKeditor 2.6.

Confirmed both bug reports.

03/11/08 10:50:49 changed by martinkou

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

03/12/08 09:44:54 changed by martinkou

  • attachment 1647.patch added.

03/12/08 09:45:15 changed by martinkou

  • keywords changed from Confirmed to Confirmed Review?.

03/13/08 10:56:36 changed by fredck

  • keywords changed from Confirmed Review? to Confirmed Review-.

The proposed patch will give a strange effect when loading the following HTML:

<ul>
    <li>
    <h1>Hit ENTER HERE -&gt;&lt;--</h1>
    <p>Line 2</p>
    </li>
</ul>

Then, just hit ENTER in between the arrows.

03/13/08 11:01:49 changed by fredck

Maybe a simple solution for it would be using FCKDomTools.BreakParent() to split the <li> in that case.

Also, right after the proposed patch, there is a "if ( oSplitInfo )" check. Any manipulation using oSplitInfo should be done inside of it.

03/14/08 08:49:02 changed by martinkou

  • attachment 1647_2.patch added.

03/14/08 08:49:29 changed by martinkou

  • keywords changed from Confirmed Review- to Confirmed Review?.

Updated patch according to Fred's suggestions.

03/14/08 15:46:54 changed by fredck

  • keywords changed from Confirmed Review? to Confirmed Review-.

The proposed patch would be ok (a line could be removed there), but it fails in the following test case (which should have been noted during the patch tests :P):

  1. Create a bulletted item.
  2. Set format to "Heading 1" to that item.
  3. Hit ENTER at the end of that item text.

In IE it throws and error... in FF it does strange things.

It is not any fault in the patch changes though. It is a bug in FCKDomTools.BreakParent. I'll propose a patch for it.

03/14/08 15:47:21 changed by fredck

  • attachment 1647_3.patch added.

03/14/08 15:55:27 changed by fredck

  • keywords changed from Confirmed Review- to Confirmed Review?.
  • owner changed from martinkou to fredck.
  • status changed from assigned to new.

The proposed patch is much similar to the previous one developed by Martin, but it fixes FCKDomTools.BreakParent.

Actually the bug fells down to FCKW3CRange._ExecContentsAction. It was not working on cases where we have a range like the following (where [ and ] are the range boundaries):

<p><b>Test[</b>]</p>

It was considering the range empty in that case. I've written several tests that helped on properly fixing it.

I'm taking this ticket to myself, so it can be properly reviewed. The fixes proposed by Martin have Review+ for me, so just other things should be reviewed now.

03/17/08 08:02:40 changed by martinkou

  • keywords changed from Confirmed Review? to Confirmed Review+.

03/18/08 09:25:15 changed by fredck

  • status changed from new to closed.
  • resolution set to fixed.

Fixed with [1714]. Click here for more info about our SVN system.