Opened 8 years ago
Last modified 8 years 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
- Click on first editor section
- 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 (3)
Change History (13)
Changed 8 years ago by
Attachment: | richcombo.PNG added |
---|
comment:1 Changed 8 years ago by
Status: | new → pending |
---|---|
Version: | 4.5.7 |
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:
- Screen cast showing how to reproduce the problem
- Reduced HTML sample file which I could put into default CKEditor samples folder and reproduce the problem.
- 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.
comment:2 Changed 8 years ago by
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 8 years ago by
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 8 years ago by
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();
}
});
comment:5 Changed 8 years ago by
Hi Swiderski, Please provide me an update once you get time to look into this.
comment:6 Changed 8 years ago by
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 8 years ago by
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();
}
});
Changed 8 years ago by
Attachment: | Error_Screenshot.PNG added |
---|
comment:8 Changed 8 years ago by
Hi Swiderski,
As I said, I have constructed a page in a clean environment without using third-party script(Ext) and I am still able to reproduce the below issue.
"Unable to get property 'window' of undefined or null reference" in scayt/plugin.js
I have attached the file and error screenshot as well. please find and kindly provide a fix for this.
Reproducible Steps:
1.Load the page (First editor section will get initialized by default).
2.Click on another editor section quickly while the page getting loaded
Attached files:
CKEditor_Test.html
Error_Screenshot.png
comment:9 Changed 8 years ago by
Hi Swiderski,
Can you please provide an update on this. This issue is now impacting more number of our application users.
Thanks, Uday
comment:10 Changed 8 years ago by
I have tried your sample in IE11 and I could reproduce it in CKEditor 4.5.7 - 4.5.9 but could not reproduce it starting from CKEditor 4.6.0 so please try upgrading to latest CKEditor 4.6.2.
NOTE: the error from commnet:8 is different to original error.
Are you still getting original error in CKEditor 4.6.2 and Ext. If yes, are you able to reproduce original issue without Ext?
Error screenshot