#3988 closed Bug (fixed)
[FF] Can not second save
Reported by: | lisaj | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.0 |
Component: | General | Version: | |
Keywords: | Confirmed Review+ | Cc: |
Description (last modified by )
In firefox (tested 3.0, 3.5) if send data via ajax and recreate editor second send no change text area. I create test file with sam error.
- Open file
- Write text
- Send
Text is set correctly
- Write another text
- Send
Old text is set
Attachments (5)
Change History (16)
Changed 16 years ago by
comment:1 Changed 16 years ago by
Keywords: | Confirmed added |
---|---|
Milestone: | → CKEditor 3.0 |
Changed 16 years ago by
Attachment: | 3988.patch added |
---|
comment:2 Changed 16 years ago by
Keywords: | Review? added |
---|
@lisaj
I didn't test the patch with your original problematic sample page, please help us to verify it with nightly build after this ticket get fixed.
comment:3 Changed 16 years ago by
Owner: | set to Garry Yao |
---|---|
Status: | new → assigned |
comment:4 Changed 16 years ago by
Description: | modified (diff) |
---|
comment:5 Changed 16 years ago by
Keywords: | Review- added; Review? removed |
---|
The proposed solution will not work on the following case:
- Create editor1 : the "original" form.submit function is replaced with "internalFunc1" (named just to make it simple to understand), saving "original".
- Create editor2: the "internalFunc1" reference is now replaced with "internalFunc2", saving "internalFunc1".
- Destroy editor1: the "original" function is set to form.submit, which should be ok.
- Destroy editor2: the "internalFunc1" function is set to form.submit... things are broken again.
So, it should be better to not interfere on the function calling chain, where "internalFunc2" calls "internalFunc1" which calls "original". We could change this model, but then the change would be much more drastic.
To maintain the current code structure, we could simply set editor.dead = true
into destroy(), and then make this "dead" check before calling editor.updateElement(), in attachToForm, eventually removing the form.on('submit') handler at that point.
Changed 16 years ago by
Attachment: | 3988_2.patch added |
---|
comment:6 Changed 16 years ago by
Keywords: | Review? added; Review- removed |
---|
comment:7 Changed 16 years ago by
Keywords: | Review- added; Review? removed |
---|
The code is ok, but the "afterDestroy" event is not thrown anywhere. Other than that, let's simply call this event "destroy". We could use "before" and "after" for every single event, but we must keep it logical and simple. The "destroy" event should be thrown when the editor is about to be destroyed.
Changed 16 years ago by
Attachment: | 3988_3.patch added |
---|
comment:9 Changed 16 years ago by
Keywords: | Review+ added; Review? removed |
---|
Providing a reduced TC.
The bug is actually due to the call to editor.destroy() on submit event.