Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#4566 closed Bug (expired)

IE7 - setData yields this.$.innerHTML is null or not an object

Reported by: Erik Kangas Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0.1
Keywords: Pending Cc: Erik Kangas

Description (last modified by Frederico Caldeira Knabben)

  • Only affects Internet Explorer v7 (have not tested v6).
  • Does not affect Opera, Chrome, and FireFox (latest versions).
  • Does not affect IE v8


  • When using setData on an editor object in Internet Explorer, the data does get set correctly and rendered correctly, however, the error "this.$.innerHTML is null or not an object" is generated.

MS Script Debugger shoes that the error happens in the ckeditor.js on line 15 at:

getHtml:function(){return this.$.innerHTML;}

If I do a JavaScript "alert" right before the setData, then there is no error. However, delaying the setData using a setTimeout does not help.

I have found a workaround. I changed the offending code to:

getHtml:function(){return (this.$) ? this.$.innerHTML : "";}

... and the error goes away.

Change History (9)

comment:1 Changed 14 years ago by Garry Yao

Keywords: Pending added

Works for me, could you provide a reduced example page?

comment:2 Changed 14 years ago by Frederico Caldeira Knabben

Description: modified (diff)

comment:3 Changed 14 years ago by Diego Caravana

Same error, but also in IE8 and with resetDirty() function, in the context of a dblclick event function of a button in the page; work around: call the function inside a setTimeout() call.

Strager and stranger: in another context (event function of "save" event of the editor), the error gets thrown but everything works without workarounds.

comment:4 Changed 14 years ago by Alfonso Martínez de Lizarrondo

Resolution: expired
Status: newclosed


Please reopen if you can provide a test page as requested by Garry

comment:5 Changed 13 years ago by Stephen Lyon

See Ticket #4525. In the command definition of the command that uses setData, setting

async: true

may fix it.

comment:6 Changed 12 years ago by Andy

I can recreate this problem 100% of the time. If you are interested in testing I can create a test scenario. I will need your email address to register you into our site and give you access to the page that is create this bug. (Note: I'm testing this using IE8). I'm using CKEditor 3.6.2.

comment:7 Changed 12 years ago by Jakub Ś

I will need your email address to register you into our site and give you access to the page that is create this bug.

Any chance for a TC in the form of a sample HTML page?
Problems inside user's application does not necessarily mean problem with CKEditor. This could be do to invalid settings/configuration of the application.

I would be nice if this problem could be isolated from the Web-App.

comment:8 Changed 12 years ago by Jakub Ś

@arudmik any updates? Any chance for a reduced TC?

comment:9 Changed 12 years ago by ArnoOnline

My script is rather complicated and not yet cleaned up so I cannot make test case. However, I did play around with my script and noted that the error occurs in Internet Explorer when I make use of setReadOnly() during the loading of my data. The following sequence is used (simplified):

theEditor.setData('Loading data...');
// Load data (AJAX)

Tested in Internet Explorer 8.x

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