Ticket #1592 (closed Bug: fixed)

Opened 19 months ago

Last modified 19 months ago

Remove blockquote command may leave empty blockquotes in IE.

Reported by: martinkou Owned by: martinkou
Priority: Normal Milestone: FCKeditor 2.5
Component: General Version: SVN (FCKeditor)
Keywords: Confimed IE Cc:

Description

Reproduction procedure:

  1. Open sample01.html in IE.
  2. Ctrl-A, Backspace to delete everything.
  3. Press blockquote button to insert blockquote.
  4. Press blockquote button to delete blockquote.

Expected results:
The blockquote should be removed, and the empty paragraph should be restored to its original position.

Observed results:
An empty blockquote is left before the restored paragraph.

Change History

Changed 19 months ago by martinkou

The bug was caused by the bookmark nodes left behind by FCKDomRange.CreateBookmark() prior to removing the blockquote.

This is what was seen in document.body.innerHTML before removing the blockquote in step 4:

<blockquote>
 <span ... _fck_bookmark="true"></span>
 <p></p>
</blockquote>

When FCKDomRangeIterator runs, it sees the bookmark span and tries to split it up into a different block. So we have...

<blockquote><span ... _fck_bookmark="true"></span></blockquote>
<blockquote>
 <p></p>
</blockquote>

After that, even thought he blockquote command correctly removes the <BLOCKQUOTE> around the <P> block, there's still one more blockquote left above it.

Changed 19 months ago by martinkou

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

Fixed with [1139].

Click here for more info about our SVN system.

Changed 19 months ago by fredck

Based on your comments, it sounds like FCKDomRangeIterator is the problem here.

Anyway, lets leave it as is. We should find a cleaner solution in the future, possibly trying to avoid bookmark nodes interfering in all editor operations in a more generic way. I've just made some cleanup with [1141].

Note: See TracTickets for help on using tickets.