Ticket #1450 (closed Bug: invalid)

Opened 7 years ago

Last modified 7 years ago

FCK API - FCKDomRange / CheckStartOfBlock & CheckEndOfBlock null pointer

Reported by: Scott Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:


Sometimes in IE, the FCKDomRange.CheckStartOfBlock and CheckEndOfBlock methods throw a nasty exception when called. I call these two methods extensively from code external to FCKeditor.

I have experienced this numerous times, however have not managed to get a clear test case. I believe this happens if these methods are called during the middle of the browsers internal cursor moving / focusing event.

The problem is that (oTestRange.EndBlock
oTestRange.EndBlockLimit) is evaluated to null.

I would like to see a sanity check placed in these two methods to stop this from happening.

eg -

var oElement = oTestRange.EndBlock || oTestRange.EndBlockLimit ;

// Sanity check
if( !oElement )
	return false ;

// Move the end boundary to the end of the block.
oTestRange.SetEnd( oElement, 2 ) ;

I have attached a screen shot as proof that IE experiences this problem.


checkblock.png (38.1 KB) - added by Scott 7 years ago.

Change History

Changed 7 years ago by Scott

comment:1 Changed 7 years ago by fredck

  • Status changed from new to closed
  • Resolution set to invalid

I think that such case may happen only if working with elements that are not in a document; a situation not reproducible in the editor normally.

Anyway, the CheckStartOfBlock and CheckEndOfBlock code changed drastically recently, so I think this change is not anymore need.

Feel free to reopen it if you think I'm wrong Scott.

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