summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Englund <marc.englund@itmill.com>2011-08-11 13:41:04 +0000
committerMarc Englund <marc.englund@itmill.com>2011-08-11 13:41:04 +0000
commitaa26eef81d2f829f62afab32ce7a2d962bdeb17f (patch)
tree1b9b76bef6471c02daebbf80c52945a702acc916
parentc287ffc8c961eab2bcb09d544c4022783aea55b5 (diff)
downloadvaadin-framework-aa26eef81d2f829f62afab32ce7a2d962bdeb17f.tar.gz
vaadin-framework-aa26eef81d2f829f62afab32ce7a2d962bdeb17f.zip
Changed VButton event handling so that isHovering is set to true onmousedown instead of onmouseover, fixes #7389
svn changeset:20310/svn branch:6.6
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VButton.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VButton.java b/src/com/vaadin/terminal/gwt/client/ui/VButton.java
index 46492a707c..b0ef38733a 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VButton.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VButton.java
@@ -209,6 +209,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
@@ -266,13 +272,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;