]> source.dussan.org Git - vaadin-framework.git/commitdiff
Merged VButton iPad/touch fix from 6.6, fixes #7389
authorMarc Englund <marc.englund@itmill.com>
Fri, 12 Aug 2011 11:35:44 +0000 (11:35 +0000)
committerMarc Englund <marc.englund@itmill.com>
Fri, 12 Aug 2011 11:35:44 +0000 (11:35 +0000)
svn changeset:20347/svn branch:6.7

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

index bde6320b322ffbe254548f20395f1e24bdc841a7..442d0709efa7a439fe667acae8611a4ae971b753 100644 (file)
@@ -215,6 +215,12 @@ public class VButton extends FocusWidget implements Paintable, ClickHandler,
             }
             break;
         case Event.ONMOUSEDOWN:
+            if (DOM.isOrHasChild(getElement(), DOM.eventGetTarget(event))) {
+                // This was moved from mouseover, which iOS sometimes skips.
+                // We're certainly hovering at this point, and we don't actually
+                // need that information before this point.
+                setHovering(true);
+            }
             if (event.getButton() == Event.BUTTON_LEFT) {
                 // save mouse position to detect movement before synthesizing
                 // event later
@@ -272,13 +278,6 @@ public class VButton extends FocusWidget implements Paintable, ClickHandler,
                 }
             }
             break;
-        case Event.ONMOUSEOVER:
-            if (DOM.isOrHasChild(getElement(), DOM.eventGetTarget(event))) {
-                setHovering(true);
-                if (isCapturing) {
-                }
-            }
-            break;
         case Event.ONBLUR:
             if (isFocusing) {
                 isFocusing = false;