fredsa / gwt-dnd

Library providing easy to use mouse or touch based drag-and-drop capabilities to GWT
42 stars 41 forks source link

Dragging removes PopupPanel's EventPreview from the DOM #43

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of GWT are you using? 1.3.3? 1.4.60? Other?
1.5.0 RC1

What version of the gwt-dnd jar file or library file are you using?
2.0.7

What operating system(s) are you using? Windows? Linux? Mac?
OS X 10.5

Does the issue occur in web mode, hosted mode, both or don't know?
Both

What browser(s) do you use? Firefox, IE, Safari, other?
Safari 3, FF 3

What is the expected output? What do you see instead?
1. The popup's show() method registers itself as an event preview (via
DOM.addEventPreview(EventPreview).
2. Once a popup is detached, it is removed from the event preview stack.
3. GWT's own dialog dragging doesn't cause a call detach, while GWT-DND's does.
4. After dragging with GWT-DND, we're left with an incorrect state, where
the dialog is no longer a registered event preview.

Do you have a workaround?
Override DragController.dragEnd() and register the dialog again.

Original issue reported on code.google.com by tom...@gmail.com on 18 Jul 2008 at 9:47

GoogleCodeExporter commented 9 years ago
Sorry, jwt-dnd version is 2.5.2

Original comment by tom...@gmail.com on 19 Jul 2008 at 9:31

GoogleCodeExporter commented 9 years ago
exists in GWT 1.7.0, gwt-dnd 2.5.6

Original comment by Alek...@gmail.com on 23 Sep 2009 at 5:28

GoogleCodeExporter commented 9 years ago
Tomerb, you pointed out that you have an workaround for this problem. I've 
tried to 
follow your suggestion, but couldn't make it work. PopupPanel has a private 
member 
nativePreviewHandlerRegistration (I assume that holds a reference to needed 
nativePreview) As I can't use reflection framework to get that reference - how 
can I 
implement the workaround? 

Original comment by Alek...@gmail.com on 24 Sep 2009 at 7:22

GoogleCodeExporter commented 9 years ago
Same problem with gwt-2.0-ms1 and gwt-dnd 2.6.5

Original comment by nicolas....@gmail.com on 16 Oct 2009 at 7:53

GoogleCodeExporter commented 9 years ago
Unfortunately, the way PopupPanel and gwt-dnd are designed, the two are largely 
incompatible. gwt-dnd must detach and reattached widgets in order to drag them 
correctly while PopupPanel is designed to be in control of it's "attachedness". 
It 
also as a fail safe in the form of an onUnload() method which disconnects the 
event 
preview if the widget is detached (as it is when gwt-dnd starts dragging it).

Instead of using PopupPanel, try one of these options:

1. Use DialogBox which can already be dragged by its heading without the need 
for 
gwt-dnd enabled dragging

2. Create your own panel (perhaps using DecoratorPanel) which can be dragged 
with 
gwt-dnd. Borrow some of the code from PopupPanel if you need to, but don't 
include 
the event preview code.

Marking as 'WontFix'.

Original comment by fredsa on 19 Oct 2009 at 6:06