Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#448 closed Bug (fixed)

FCKSelection.GetSelectedElement() for IE should return null

Reported by: Joe Wieloch Owned by:
Priority: Low Milestone:
Component: General Version:
Keywords: Cc:


It would be nice if ... FCKSelection.GetSelectedElement() in fckselection_ie.js returned null when there is not a selected element so behavior is consistent between gecko and IE

Change History (3)

comment:1 Changed 17 years ago by Joe Wieloch

Looking at where GetSelectedElement() gets called, maybe this isn't a bug. It might be that in IE a null is NOT necessary to return for it to be evaluated...

if ( !returnValue ) {} seems to be used to evaluate the return instead of comparing to null. If this is the case please close this bug.

comment:2 Changed 17 years ago by Alfonso Martínez de Lizarrondo

Resolution: fixed
Status: newclosed

Did you had any problem?

The return null in gecko code was added (IIRC) while checking with strict error warning enabled in firefox, but the IE code was checked with JsLint and it doesn't seem to trigger a warning in that function.

Anyway, I've added the line in [280]

comment:3 Changed 17 years ago by Joe Wieloch

Only problem was my own. I had checked the function in the gecko specific code and saw that it returned a null, I then assumed to check for null in my code. When I ran in IE my code failed because null is not returned in the IE case.

I changed 'my' code to check if ( returnValue ) {}, instead of if ( returnValue == null ) and then everything worked fine.

I'm just adding this comment because I could understand [given the size restricted coding environment] why "return null;" wouldn't be added everywhere if unnecessary.

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