#11211 closed Bug (invalid)
The data within the editor is disappeared when you select other tab.
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
When you select other tab in application, the data within the editor disappears. It throws an error "Uncaught TypeError: Cannot call method 'getSelection' of undefined". The editor also becomes uneditable. Application is developed using GWT.
In order to reproduce bug:
- Sign in to aws.kpi.com. And navigate to CRM from top menu.
You can use these credentials: Login - ckeditor@… Password - ckeditor1
- Go to Add New->Case (see screenshot. Step 1)
- Write some data in CKEditor
- Switch to other tab, e.g. 'Message Center' (see screenshot. Step 2). Then return to Add Message tab.
- The data within the editor is lost and editor becomes uneditable
Please resolve the issue
Attachments (1)
Change History (7)
Changed 11 years ago by
Attachment: | CkeditorProblem.png added |
---|
comment:1 follow-up: 4 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 follow-up: 3 Changed 11 years ago by
Hi,
Thanks for credentials. I have check implementation and I have couple of questions to ask.
- I got same error in both cases.
- I have loaded new case, typed few words and then pressed outside browser window and waited.
- Applied your TC and waited
- In both cases I have got "LZString is not defined" which is thrown somewhere around such code LZString.compressToUTF16(JSON.stringify.
- I have then checked your build-config.js files and noticed that you use one custom plugins which is autosave - could it be that this is happening because of this plugin?
You could try same TC without it and if that is the case report it to plugin author (This is third-party plugin).
comment:3 Changed 11 years ago by
Hi, "LZString is not defined" error disappeared after I removed autosave plugin. But I guess it was not causing the problem.
After editor is frozen and you press some button in editor. Chrome says: Uncaught TypeError: Cannot call method 'getSelection' of undefined Firefox says: TypeError: this.document.getWindow(...).$ is undefined error
Replying to j.swiderski:
Hi,
Thanks for credentials. I have check implementation and I have couple of questions to ask.
- I got same error in both cases.
- I have loaded new case, typed few words and then pressed outside browser window and waited.
- Applied your TC and waited
- In both cases I have got "LZString is not defined" which is thrown somewhere around such code LZString.compressToUTF16(JSON.stringify.
- I have then checked your build-config.js files and noticed that you use one custom plugins which is autosave - could it be that this is happening because of this plugin?
You could try same TC without it and if that is the case report it to plugin author (This is third-party plugin).
comment:4 Changed 11 years ago by
I'm not removing anything. Maybe GWT switch tab code doing some DOM manipulations under the hood. But I don't have control over it.
Replying to Reinmar:
Before removing editor from DOM you've got to destroy it using editor.destroy() method. I guess that this is the reason why error is thrown - you remove it from DOM when switching tabs, but don't destroy it.
I cannot login to your CRM though (login and password do not work), so I cannot check it though.
comment:5 Changed 11 years ago by
So what you are saying is that you still get error despite removing autosave plugin.
Could you perhaps try destroying editor before changing tabs or closing tab and creating it when tab is opened/created? Perhaps this will solve your issue? On each tab click you can destroy old and create new editor.
As for the data you could write it somewhere on editor destroy and load it on editor creation.
comment:6 Changed 11 years ago by
Maybe GWT switch tab code doing some DOM manipulations under the hood. But I don't have control over it.
But CKEditor does not have control too. But I'm rather sure that GWT allows to listen on tab changes.
Before removing editor from DOM you've got to destroy it using editor.destroy() method. I guess that this is the reason why error is thrown - you remove it from DOM when switching tabs, but don't destroy it.
I cannot login to your CRM though (login and password do not work), so I cannot check it though.