Tuesday, January 24, 2012

Re: GWT 2.4.0 native drag and drop... does it *really* work with IE9?

Ok. In the Google I/O talk they say that IE8+ is supported, so
something broke since then.

On Jan 24, 3:07 pm, rakesh wagh <rake...@gmail.com> wrote:
> we found that the drag and drop api is not usable at this point. There
> is not a single browser in which this api work as expected. I think
> the api is still in development and should not be used at this point,
> unless you require part of it to work with specific browser.
>
> On Jan 24, 11:44 am, Rori Stumpf <r...@simplesmartads.com> wrote:
>
>
>
>
>
>
>
> > Following the example from Google I/O 2011 (youtube video), I wrote
> > the following code which successfully implements drag and drop on
> > Chrome, Firefox and Safari.
> > But, of course, it does not work with IE9..
>
> > Here is the code... any obvious problems? What's up with GTW & native
> > drag and drop with IE9?
>
> > Thanks in advance... (p.s. I'd prefer to stick with native rather than
> > use a lib)
>
> >         public void onModuleLoad() {
>
> >                 RootPanel.get("flow").add(dropLabel);
> >                 RootPanel.get("flow-components").add(dragLabel);
>
> >                 // Configure the draggable element
> >                 dragLabel.getElement().setDraggable(Element.DRAGGABLE_TRUE);
> >                 dragLabel.addDragStartHandler(new DragStartHandler() {
> >                         @Override
> >                         public void onDragStart(DragStartEvent event) {
> >                                 event.setData("text", "drag-data");
> >                                 event.getDataTransfer().setDragImage(dragLabel.getElement(), 0,
> > 0);
> >                         } });
>
> >                 // Configure the drop target
> >                 dropLabel.addDragOverHandler(new DragOverHandler() {
> >                         @Override
> >                         public void onDragOver(DragOverEvent event) {
> >                                 dropLabel.setText("Dragging Over");
> >                         } });
> >                 dropLabel.addDragLeaveHandler(new DragLeaveHandler() {
> >                         @Override
> >                         public void onDragLeave(DragLeaveEvent event) {
> >                                 dropLabel.setText("Drop Here");
> >                         } });
> >                 dropLabel.addDropHandler(new DropHandler() {
> >                         @Override
> >                         public void onDrop(DropEvent event) {
> >                                 Window.alert("Dropped!");
> >                         } });
>
> >         }

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment