If within a drop event handlers, we remove the draggable from the DOM, a
NullPointerException occurs when we fire the DragStop event
java.lang.NullPointerException: null
at gwtquery.plugins.draggable.client.events.DragContext.init(DragContext.java:104)
at gwtquery.plugins.draggable.client.events.DragContext.<init>(DragContext.java:48)
at gwtquery.plugins.draggable.client.events.AbstractDraggableEvent.<init>(AbstractDraggableEvent.java:41)
at gwtquery.plugins.draggable.client.events.DragStopEvent.<init>(DragStopEvent.java:37)
at gwtquery.plugins.draggable.client.Draggable$3.execute(Draggable.java:490)
Workaround :
Wrap your code removing the draggable from the dom inside and deferred command :
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
public void execute() {
//remove your draggable element here
}
});
Original issue reported on code.google.com by julien.d...@gmail.com on 3 Apr 2012 at 8:38
Original issue reported on code.google.com by
julien.d...@gmail.com
on 3 Apr 2012 at 8:38