Opened 17 years ago

Closed 17 years ago

#1450 closed Bug (invalid)

FCK API - FCKDomRange / CheckStartOfBlock & CheckEndOfBlock null pointer

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

Description

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.

Attachments (1)

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

Download all attachments as: .zip

Change History (2)

Changed 17 years ago by Scott McNaught

Attachment: checkblock.png added

comment:1 Changed 17 years ago by Frederico Caldeira Knabben

Resolution: invalid
Status: newclosed

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 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy