]> source.dussan.org Git - vaadin-framework.git/commitdiff
#8345, #8346 Window drag and resize are now activated only by the left mouse button
authorArtur Signell <artur.signell@itmill.com>
Fri, 3 Feb 2012 15:02:50 +0000 (15:02 +0000)
committerArtur Signell <artur.signell@itmill.com>
Fri, 3 Feb 2012 15:02:50 +0000 (15:02 +0000)
svn changeset:22889/svn branch:6.7

src/com/vaadin/terminal/gwt/client/ui/VWindow.java

index 7b9ece24c9091f08918eece85d81ea242d3446ed..de0106164100cb108e77986795a570185d7b91e7 100644 (file)
@@ -953,7 +953,7 @@ public class VWindow extends VOverlay implements Container,
     }
 
     private void onResizeEvent(Event event) {
-        if (resizable) {
+        if (resizable && Util.isTouchEventOrLeftMouseButton(event)) {
             switch (event.getTypeInt()) {
             case Event.ONMOUSEDOWN:
             case Event.ONTOUCHSTART:
@@ -1181,6 +1181,10 @@ public class VWindow extends VOverlay implements Container,
     }
 
     private void onDragEvent(Event event) {
+        if (!Util.isTouchEventOrLeftMouseButton(event)) {
+            return;
+        }
+
         switch (DOM.eventGetType(event)) {
         case Event.ONTOUCHSTART:
             if (event.getTouches().length() > 1) {