PDA

View Full Version : TextBox in Drag/Drop examples (field-to-grid-dd) not editable.



29er
13 Jan 2011, 4:15 PM
HI,
I am trying to accomplish something similar to the Drag/Drop example in 'examples/dd/field-to-grid-dd.html'. Has anyone noticed that you cant enter text in any of these fields.
It seems that the Drag/Drop 'getDragData' on mousedown is blocking this functionality, but i've tried to tweak the code and to no avail.
I still want to allow users to enter data in fields, and only Drag/Drop once they start dragging in the field.
Is this impossible, or is there another way to go about it ?

Thanks for any insight :)

29er
13 Jan 2011, 4:25 PM
So i basically figured this out by putting focus in the getDragData function.


getDragData: function(e) {
var t = e.getTarget('input');
t.focus();

i don't like this however, because if user tries to highlight text in the field, the drag operation will ovveride it.
i guess i'll have to put the drag operation on the field label instead...
If anyone has a good solution for this feel free to help me out. :)
thanks