views:

285

answers:

1
+2  Q: 

Dojo dnd input box

I'm trying to move the contents of an input box using Dojo DnD, so the HTML looks something like this:

<div id="input_box">
  <input type="text" class="my_input_box_style" />
</div>

And the JavaScript looks something like this:

var dndSource = new dojo.dnd.AutoSource(dojo.byId("input_box"), {
  singular: true,
  copyOnly: true,
  selfCopy: false,
  selfAccept: false,
  accept: false
});

if(dndSource) {
  dojo.connect(dndSource, "onDrop", null, my_dnd_method, true);
}

But for whatever reason when I'm trying to do the actual drag operation, i'm not getting any dragging going on.

A: 

Does it work if you use a dojo.dnd.Moveable instead of dojo.dnd.AutoSource?

Abboq