Opened 9 years ago
Closed 9 years ago
#15813 closed defect (fixed)
onLoad dijit.Editor causes "This deferred has already been resolved"
Reported by: | Roman | Owned by: | Roman |
---|---|---|---|
Priority: | undecided | Milestone: | 1.8 |
Component: | Editor | Version: | 1.7.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
HTML code:
<div data-dojo-type="dijit.Dialog" data-dojo-id="blogEditFormDialog"> <form data-dojo-type="dijit.form.Form" data-dojo-id="blogEditForm"> <div class="dijitDialogPaneContentArea"> <div data-dojo-type="dijit.Editor" name="blog-content" id="blog-content"><p></p> </div>
Error appears on page load:
arguments: undefined get stack: function () { [native code] } message: "This deferred has already been resolved" set stack: function () { [native code] } type: undefined __proto__: SetUpError.d dojo.js.uncompressed.js:4212 dojo.Deferred.reject.errback dojo.js.uncompressed.js:4212 dojo.Deferred.reject.errback dojo.js.uncompressed.js:4212 notify dojo.js.uncompressed.js:4182 dojo.Deferred.promise.then.then dojo.js.uncompressed.js:4279 dojo.Deferred.addCallbacks dojo.js.uncompressed.js:4235 lang.extend.addCallback dojo.js.uncompressed.js:4306 _3.onLoad RichText.js:442 (anonymous function) RichText.js:221 hitch dojo.js.uncompressed.js:11753 onload about:blank:27 _4.postCreate Dialog.js:10 _277.create dijit.js:15 inherited dojo.js.uncompressed.js:6783 _9.create ContentPane.js:12 _277.postscript dijit.js:15 (anonymous function) dojo.js.uncompressed.js:6923 _1.parser.instantiate parser.js:180 forEach dojo.js.uncompressed.js:14756 _1.parser.instantiate parser.js:56 _1.parser.parse parser.js:292 _4._parse html.js:120 _4.onEnd html.js:94 _4.set html.js:46 _9._setContent ContentPane.js:176 _9._setContentAttr ContentPane.js:61 _277.set dijit.js:15 _277._applyAttributes dijit.js:15 _277.create dijit.js:15 inherited dojo.js.uncompressed.js:6783 _9.create ContentPane.js:12 _277.postscript dijit.js:15 (anonymous function) dojo.js.uncompressed.js:6923 _1.parser.instantiate parser.js:180 forEach dojo.js.uncompressed.js:14756 _1.parser.instantiate parser.js:56 _1.parser.parse parser.js:292 hitch
The only way to get rid of error is to remove the Editor DIV (<DIV data-dojo-type="dijit.Editor")
Attachments (1)
Change History (13)
comment:1 Changed 9 years ago by
Owner: | set to Roman |
---|---|
Status: | new → pending |
comment:2 Changed 9 years ago by
Status: | pending → new |
---|
Attachment (dialogEditor.html) added by ticket reporter.
comment:3 Changed 9 years ago by
Thank you for the response.
Test case file attached, the case is clearly reproducible.
comment:4 Changed 9 years ago by
Cc: | Mark Wubben added |
---|
OK, thanks. Well it started in [29336] although I'm not sure if it's the fault of the dojo/Deferred code or an issue with editor.
comment:5 Changed 9 years ago by
Cc: | Mark Wubben removed |
---|
OK.... yah onLoad is called twice for the iframe, presumably once when the Editor is created and then again when the Dialog is shown. So it's an issue w/the Editor.
comment:6 Changed 9 years ago by
The error appears if you call dialog.show(); or not.
In attached testcase dialog.show(); is called but if you remove the call it makes no difference.
comment:7 follow-up: 9 Changed 9 years ago by
This error would only come from the old dojo/_base/Deferred by the way, new code by default does not throw errors when a fulfilled deferred is fulfilled again.
comment:8 Changed 9 years ago by
What is old and new dojo/_base? 1.7.3 is the latest release. is it not new?
or is it about 2.0? 1.8? that's "new" ?
comment:9 Changed 9 years ago by
Replying to markwubben:
This error would only come from the old dojo/_base/Deferred by the way, new code by default does not throw errors when a fulfilled deferred is fulfilled again.
What is old and new dojo/_base? 1.7.3 is the latest release. is it not new?
or is it about 2.0? 1.8? that's "new" ?
comment:10 Changed 9 years ago by
dojo/Deferred is the new code, and dojo/_base/Deferred is the old code, but the editor is still using the old code for back-compat.
comment:12 Changed 9 years ago by
Milestone: | tbd → 1.8 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Great.
IIRC Editor doesn't work well in Dialog because it doesn't like to be initialized as hidden. (It also doesn't like to be initialized unattached to the DOM, so new Editor() definitely doesn't work.
Anyway, please attach a test case using the "attach file" button. It should be as small as possible to still reproduce the problem, but something we can load in the browser and use to reproduce then problem. Then I can check if the behavior regressed from previous releases.
Thanks!