Opened 2 weeks ago

Last modified 23 hours ago

#16898 pending Bug

Getting "Unable to set property 'setState' of undefined and null reference" in richcombo/plugin.js

Reported by: kamalnayan Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc: log.kamaln@…

Description

We are using ckeditor4.5.7 in our applications which contains multiple editor sections and getting the error when we click on first editor section and then click on another editor section quickly. There could be a race condition due to which facing issue. but, please look into this and let me know if there is any fix for that.

Steps to reproduce

  1. Click on first editor section
  2. Click on another editor section quickly

Expected result

Should work without any issue

Actual result

Getting "Unable to set property 'setState' of undefined and null reference" error in richcombo/plugin.js

Other details (browser, OS, CKEditor version, installed plugins)

Browser:IE11, OS:Win-7, CKEditor:4.5.7

Attachments (1)

richcombo.PNG (307.6 KB) - added by kamalnayan 2 weeks ago.
Error screenshot

Download all attachments as: .zip

Change History (8)

Changed 2 weeks ago by kamalnayan

Error screenshot

comment:1 Changed 2 weeks ago by j.swiderski

  • Status changed from new to pending
  • Version 4.5.7 deleted

I have not been able to reproduce that. I have tried using multiple editors on page, clicking into them or into dropdowns when they load but nothing has happen. Please provide:

  1. Screen cast showing how to reproduce the problem
  2. Reduced HTML sample file which I could put into default CKEditor samples folder and reproduce the problem.
  3. Please also try reproducing this issue in latest default CKEditor 4.6.2 and outside of your application in order to exclude the influence of third-part scripts and third-party editor plugins.
Last edited 2 weeks ago by j.swiderski (previous) (diff)

comment:2 Changed 2 weeks ago by kamalnayan

Thanks! a lot for the reply Swiderski, Is there any way to check the editor is instantiated properly with all the plugins associated with it. like wordcount, scayt, richcombo etc.

comment:3 Changed 11 days ago by j.swiderski

Please see https://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-instanceReady e.g. This function will be fired after CKEditor has been fully initialized.

vare editor = CKEDITOR.replace('editor1', {/*config goes here*/});
editor.on('instanceReady', function( evt ){
// you can call editor or evt.editor or other code of your choice here
});

@kamalnayan you need this to reproduce the problem or your problem was calling some code too early?

comment:4 Changed 9 days ago by kamalnayan

Hi Swiderski, I have tried even masking panel till the CKEditor is fully initialized to avoid above JS error. But, able to reproduce the same issue once I click another editor section quickly just after unmasking panel on instance ready of CKEditor. Please find below code snippet used and let me know what should be the fix of this.

CKEDITOR.on('instanceReady',function(e){

if(Ext.get("documentView")){

Unmask once the editor is fully initialized

Ext.getCmp("documentView").getEl().unmask();

}

});

Last edited 9 days ago by kamalnayan (previous) (diff)

comment:5 Changed 4 days ago by kamalnayan

Hi Swiderski, Please provide me an update once you get time to look into this.

comment:6 Changed 3 days ago by j.swiderski

click another editor section quickly just after unmasking panel on instance ready

Were both editors loaded or just a single one?

Is it possible to reproduce this issue without Ext? This is quite a big framework and it is really hard to say whether there is something wrong in the editor or rather in Ext which is conflicting with CKEditor. It could also be an invalid usage of Ext for example.

Are you able to reproduce it in clean environment without any third-party scripts?

comment:7 Changed 23 hours ago by kamalnayan

Hi Swiderski, I am constructing a page with multiple editor sections without using third party script to reproduce the issue. I will get back to you once it is ready.

Meanwhile, As per my last comment I am just restricting user to click another editor section(Both editor sections are loaded) on applying mask and trying to unmask once any of below two events gets fired. but below both events are not even getting fired for me. can you please let me know if there is any other way to use below events or is there any specific place to use below two events.

loaded: Event fired when editor components (configuration, languages and plugins) are fully loaded and initialized. However, the editor will be fully ready to for interaction on instanceReady. CKEDITOR.on('loaded',function(e){

if(Ext.get("documentView")){

Ext.getCmp("documentView").getEl().unmask();

}

});

pluginsLoaded: Event fired when all plugins are loaded and initialized into the editor instance. CKEDITOR.on('pluginsLoaded',function(e){

if(Ext.get("documentView")){

Ext.getCmp("documentView").getEl().unmask();

}

});

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