Closed GoogleCodeExporter closed 9 years ago
I think this should be viewed as a defect because in the drag handler class
there is a behavior setting specifically to set the drag start threshold pixel
size to >0 to "allow other registered listeners to respond to events" when the
user is not trying to drag the widgets but is just trying to interact with
them. So if the design of the library already includes allowing for other
listeners to remain usable, then this case will go against that design
principle. The problem is that this issue is preventing forms from being
draggable, because once they are made draggable they cannot be used as forms. I
will try the above turn around for now and see if it works in my situation.
Is this is a bug? Are we using the library wrong? Or if it is a bug, is there
a better work around than the one suggested above, which would not require
changing the source code.
Original comment by kor...@gmail.com
on 15 Apr 2011 at 2:46
It sounds like the fact that your focus/blur events are not received is a side
effect of the preventDefault() call, which we need.
Hopefully setting the drag sensitivity > 0 will help.
Original comment by fredsa@google.com
on 21 Jun 2011 at 12:24
Sorry, but setting the drag sensitivity > 0 doesn't help.
The only workaround I found for this problem is to add a mouse down listener
and set the focus manually again:
focusable.addMouseDownHandler(new MouseDownHandler() {
@Override
public void onMouseDown(MouseDownEvent event) {
focusable.setFocus(true);
}
});
Original comment by m...@censhare.de
on 21 Jun 2011 at 7:50
Thanks for your response!
I realized a work around exists which actually solves my problem. The truth is
that typically people do not want to make an entire panel full of fields
grabable directly. What is more desirable is to designate an icon on the panel
which represents the drag handle, and make the panel draggable by dragging that
icon. This is how almost everything works in all OSs native UIs as well and it
makes sense. I realized that the gwt-dnd library supports drag handles out of
the box, and I implemented my form dragging based on using drag handles.This
leaves all the form functionality intact and it also created a better user
experience with minimal work. So I found my answer.
Thanks again for the reply.
Original comment by kcsas...@securezone360.com
on 21 Jun 2011 at 1:10
Please try the jar attached to this comment and let me know if that solves your
problem:
http://code.google.com/p/gwt-dnd/issues/detail?id=52#c6
Original comment by fredsa
on 31 Jan 2012 at 5:57
Actually, I'm going to mark this as a dup of issue 52
Original comment by fredsa
on 31 Jan 2012 at 6:15
Original issue reported on code.google.com by
m...@censhare.de
on 26 Jul 2010 at 8:00