#12062 closed defect (fixed)
dojoAttachEvent not working with dojo.dnd.Source in dijit templates
Reported by: | cjolif | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | 1.6 |
Component: | DnD | Version: | 1.5 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
dojoAttachEvent in dijit templates are working fine on regular HTML tags and regular dijit widgets but not on dojo.dnd.Source objects. This limitation is not specified here: http://docs.dojocampus.org/dijit/_Templated So this looks either like a documentation bug or a code bug. Considering how useful that is (at least as useful as for dijit widgets) I think the code should be fixed.
This can be worked around by explicitly adding the right properties to the Source object:
dojo.extend(dojo.dnd.Source,{ dojoAttachEvent: "", dojoAttachPoint: "", waiRole: "", waiState:""});
Attach code reproduces the issue.
Attachments (1)
Change History (4)
Changed 12 years ago by
comment:1 Changed 12 years ago by
Component: | General → DnD |
---|---|
Milestone: | tbd → future |
Owner: | changed from anonymous to Eugene Lazutkin |
Status: | new → assigned |
comment:2 Changed 12 years ago by
Description: | modified (diff) |
---|---|
Milestone: | future → 1.6 |
Resolution: | → fixed |
Status: | assigned → closed |
I think actually it is already supported, by using the new parser syntax of data-dojo-attach-event and data-dojo-attach-point. Didn't actually try it, but you can see the InlineEditBox.html template as an example.
comment:3 Changed 12 years ago by
I confirm that this is working with the new syntax in 1.6:
<div> <div data-dojo-type="dojo.dnd.Source" class="container" data-dojo-attach-event="onDrop:onDrop" horizontal="true" style="height: 30px; background: grey"></div> <br /> </div>
(even though still not working with "old" syntax...)
I am not sure if we want to support it --- use cases are not clear.