2

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.

Michael
  • 1,626
  • 11
  • 23
  • What are you getting? Any errors? No avatar? Everything should be straightforward with HTML fragments like yours. The most common question is "why I can't select text in my input box, which is a part of a DnD item?" - the answer is "use 'skipForm: true'". But I understand you have a different problem. – Eugene Lazutkin Dec 19 '09 at 07:16
  • Huh. Care to open a bug ticket and attach a minimalistic file that reproduces your problem? – Eugene Lazutkin Dec 25 '09 at 00:42

1 Answers1

0

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

Abboq
  • 1,101
  • 1
  • 10
  • 21