]> source.dussan.org Git - vaadin-framework.git/commitdiff
IE now behaves with its text selection during drag and drop
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 15 Mar 2010 16:54:23 +0000 (16:54 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 15 Mar 2010 16:54:23 +0000 (16:54 +0000)
svn changeset:11892/svn branch:6.3

src/com/vaadin/terminal/gwt/client/ui/dd/VDragAndDropManager.java

index 839b5dd7a6b5db257ae1bcc118ec4feb515c105b..fdb3c47ba3c6429bd92bbaa70fb1dc4e6395eea1 100644 (file)
@@ -308,6 +308,8 @@ public class VDragAndDropManager {
                         lazyAttachDragElement.run();
                     }
                 }
+                // just capture something to prevent text selection in IE
+                Event.setCapture(RootPanel.getBodyElement());
             }
         };
 
@@ -473,6 +475,10 @@ public class VDragAndDropManager {
         currentDrag = null;
 
         clearDragElement();
+
+        // release the capture (set to prevent text selection in IE)
+        Event.releaseCapture(RootPanel.getBodyElement());
+
     }
 
     private void clearDragElement() {