summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/AbstractClickEventHandler.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/client/src/com/vaadin/client/ui/AbstractClickEventHandler.java b/client/src/com/vaadin/client/ui/AbstractClickEventHandler.java
index 823618bd8f..bd2654df75 100644
--- a/client/src/com/vaadin/client/ui/AbstractClickEventHandler.java
+++ b/client/src/com/vaadin/client/ui/AbstractClickEventHandler.java
@@ -15,7 +15,6 @@
*/
package com.vaadin.client.ui;
-import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.dom.client.NativeEvent;
import com.google.gwt.event.dom.client.ContextMenuEvent;
import com.google.gwt.event.dom.client.ContextMenuHandler;
@@ -49,7 +48,7 @@ public abstract class AbstractClickEventHandler implements MouseDownHandler,
/**
* The element where the last mouse down event was registered.
*/
- private JavaScriptObject lastMouseDownTarget;
+ private Element lastMouseDownTarget;
/**
* Set to true by {@link #mouseUpPreviewHandler} if it gets a mouseup at the
@@ -75,7 +74,7 @@ public abstract class AbstractClickEventHandler implements MouseDownHandler,
Element elementUnderMouse = Util.getElementUnderMouse(event
.getNativeEvent());
if (lastMouseDownTarget != null
- && elementUnderMouse.cast() == lastMouseDownTarget) {
+ && elementUnderMouse == lastMouseDownTarget) {
mouseUpPreviewMatched = true;
} else {
System.out.println("Ignoring mouseup from "
@@ -172,7 +171,7 @@ public abstract class AbstractClickEventHandler implements MouseDownHandler,
* When getting a mousedown event, we must detect where the
* corresponding mouseup event if it's on a different part of the page.
*/
- lastMouseDownTarget = event.getNativeEvent().getEventTarget();
+ lastMouseDownTarget = Util.getElementUnderMouse(event.getNativeEvent());
mouseUpPreviewMatched = false;
mouseUpEventPreviewRegistration = Event
.addNativePreviewHandler(mouseUpPreviewHandler);