Followup of : #2545360: CKEditor 4.5.2 seems to not work
Since that issue, we always create a widget when we start dragging, to be more compatible with changes in latest ckeditor. However if the drop fails we have to do some more cleanup.
Its not critical, as it works fine without this, but its a nice to have.
Attached patch from the other issue.
Currently the patch has issue on IE 9 SCRIPT5007: Unable to get value of the property 'find': object is null or undefined
ckeditor.js: line 1129 character 190
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | widget-cleanup-2546712-10.patch | 2.08 KB | gifad |
| #7 | widget-cleanup-2546712-7.patch | 2.3 KB | gifad |
| #4 | widget-cleanup-2546712-4.patch | 1.11 KB | gifad |
| widget-cleanup-2545360-16.patch | 1.09 KB | nagy.balint |
Comments
Comment #2
nagy.balint commentedComment #3
nagy.balint commentedComment #4
gifad commentedOnly checked with firefox 40
with widget-cleanup-2545360-16_0.patch, the widget is not properly deleted : you can find a reference at :
CKEDITOR.instances["edit-body-und-0-summary"]._.editable.editor.widgets.instances[0]with attached patch, CKEDITOR.instances["edit-body-und-0-summary"]._.editable.editor.widgets.instances is empty...
don't know if this is related to IE9 error, but anyway, this is the recommended method, per http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-destroy
steps to reproduce :
node/add/article
drop an atom in body "value" text area
check firebug DOM tab of the "summary" text area
Comment #5
gifad commentedComment #6
nagy.balint commentedYes, i tried that line in comment #18, but it did not make any difference in IE9, so the new patch has the same issue in IE9.
Likely we need a different approach.
Comment #7
gifad commentedThe attached patch does two optimisations :
- The drag process is initiated only for visible ckeditor instance(s)
- The widget refresh (with the associated ajax call) is deferred until the atom is actually dropped
about the IE9 error :
- does it occur when the summary textarea is hidden, visible, or both ?
- does it occur in iframe mode, divarea mode, or both ?
finally, could you provide the call stack to the error ?
Comment #8
nagy.balint commentedAbout your questions:
It's just two separate text area. Not using summary.
It occurs in iframe mode. Did not test the divarea plugin.
Unfortunately ie9 does not provide a call stack. So I would need to set up the dev version of ckeditor and put in a trace call. But I cannot do that right now. Maybe I can set it up next week.
Comment #9
nagy.balint commentedThanks!
patch #4 had the IE 9 error, but patch #7 works without error, so probably one of the additions fixed it.
Can we move widget.data.drag = false; into cleanupDrag?
Otherwise it seems nice.
Comment #10
gifad commentedYes we can !
We can even get rid of this ugly
widget.data.drag, by dropping the atom in its downcast state, and callrefreshAtom()after drop;now,
refreshAtom()is disabled if and only if the atom wrapper has no parent.Limited test, with firefox 40 only...
Comment #12
nagy.balint commentedThanks, Committed.
(Passes my tests)