Opened 13 years ago

Closed 13 years ago

#6590 closed Bug (duplicate)

q is null

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



I am getting a weird problem with firefox. Everything seems to be working, yet I'm getting an error "q is null". Going through the minified code, it shows this line:

var q=r.document.getSelection().getNative(); q.removeAllRanges(); q.addRange(p);

this translates into the unminified code in the plugin.js to about line 1363: var selection = this.document.getSelection().getNative(); selection.removeAllRanges(); selection.addRange( nativeRange );

From this bug, I can assume that the selection variable is null. Is there a reason why this is assumed to never be null?

It seems to happen mostly when the ckeditor field is not displayed on the screen (i.e. in a div with a style="display:none", and I'm calling a CKEDITOR.replace() on it.

Putting a if(q!=null) around the 2 statements prevents this error.

Change History (1)

comment:1 Changed 13 years ago by Garry Yao

Resolution: duplicate
Status: newclosed

DUP of #6577.

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