Ticket #4566 (closed Bug: expired)

Opened 5 years ago

Last modified 2 years ago

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

Reported by: kangas@… Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0.1
Keywords: Pending Cc: kangas@…

Description (last modified by fredck) (diff)

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

Description:

  • 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

comment:1 Changed 4 years ago by garry.yao

  • Keywords Pending added

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

comment:2 Changed 4 years ago by fredck

  • Description modified (diff)

comment:3 Changed 4 years ago by dcaravana

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 4 years ago by alfonsoml

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

Expired.

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

comment:5 Changed 3 years ago by slyon

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

async: true

may fix it.

comment:6 Changed 2 years ago by arudmik

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 2 years ago by j.swiderski

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 2 years ago by j.swiderski

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

comment:9 Changed 2 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...');
theEditor.setReadOnly(true);
// Load data (AJAX)
theEditor.setReadOnly(false);
theEditor.setData(content);

Tested in Internet Explorer 8.x

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