Opened 16 years ago
Last modified 16 years ago
#4552 closed Bug
Float panel menu will not respond after the editor instance is re-created. — at Version 10
| Reported by: | markuspaek | Owned by: | Garry Yao |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 3.1 |
| Component: | UI : Floating Panel | Version: | SVN (CKEditor) - OLD |
| Keywords: | IBM Confirmed Review+ | Cc: | matti.jarvinen@…, jitendra.kumar.jitu@…, jkavanag@… |
Description (last modified by )
check '_samples/ajax.html' (this is from your current distribution)
- Create an editor instance.
- Click the toolbar buttons such as 'text color' or 'font size' and select something in the float panel menu.
- Destroy the editor instance.
- Create a new editor instance.
- Then the toolbar buttons do not respond when clicked.
Firefox 3.5.3
Windows XP
Change History (13)
comment:1 Changed 16 years ago by
| Cc: | matti.jarvinen@… added |
|---|---|
| Priority: | Normal → High |
comment:2 Changed 16 years ago by
| Component: | General → UI : Floating Panel |
|---|
related to #4241
panels get destroyed right but, panels[key] exists every time after the creation of the first editor with same parameters ( CKEDITOR.replace('editorField'); ) even though CKEDITOR.instances.editorField.destroy() is called.
plugins/floatpanel/plugin.js getPanel line 16-
var panel = panels[key]; ... return panel;
later on $ : function
... // Register panels to editor for easy destroying ( #4241 ). editor.panels ? editor.panels.push( element ) : editor.panels = [ element ];
themes/default/theme.js destroy line 156
var container = editor.container, panels = editor.panels; ... for( var i = 0 ; panels && i < panels.length ; i++ ) panels[ i ].remove();
Changed 16 years ago by
| Attachment: | 4552.patch added |
|---|
comment:3 Changed 16 years ago by
| Keywords: | Confirmed added |
|---|---|
| Milestone: | → CKEditor 3.1 |
| Owner: | set to Garry Yao |
| Priority: | High → Normal |
| Status: | new → assigned |
| Version: | 3.0.1 → SVN (CKEditor) |
@matti: Thanks for the wonderful bug reporting and issue catching which helps us to locate the bug in a second.
comment:4 Changed 16 years ago by
| Keywords: | Review? added |
|---|
comment:5 Changed 16 years ago by
| Keywords: | Review- added; Review? removed |
|---|
The proposed patch will not work if you have more than one instance of the editor in the page.
comment:6 Changed 16 years ago by
After discuss with Fred, the patch break the panel sharing mechanism between editors, so another solution should be found.
Changed 16 years ago by
| Attachment: | 4552_2.patch added |
|---|
comment:7 Changed 16 years ago by
| Keywords: | Review? added; Review- removed |
|---|
comment:8 Changed 16 years ago by
| Keywords: | Review- added; Review? removed |
|---|
- Let's call the event "instanceDestroyed" instead of "instanceDestroy", just to be aligned with the "instanceCreated" name.
- editor.panels is not needed anymore. We can use only the private panels for all needs (hide and destroy them in the same loop).
- A "debugger" line remained in the code.
- The coding style is bad is several places. It deserves attention and correction.
Changed 16 years ago by
| Attachment: | 4552_3.patch added |
|---|
comment:9 Changed 16 years ago by
| Keywords: | Review? added; Review- removed |
|---|
Corrected the above mentioned issue.
comment:10 Changed 16 years ago by
| Description: | modified (diff) |
|---|

I noticed the same with IE8 and FF 3.5.3. With floatpanel buttons mentioned and format and style selections.
It seems to work the first time you use the button. On a second time with different instance floatpanel buttons that are unused work but after you have used them and destroy and create the instance again those buttons don't work anymore.
Is the floating selection created once (when shown) and instance of it saved in a variable that isn't cleared with editor.destroy() so it isn't recreated on a new instance?
Error I get is this.$ is undefined
Practically this is the showstoppper.