summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-12-14 16:28:24 +0200
committerLeif Åstrand <leif@vaadin.com>2012-12-14 16:28:24 +0200
commit2a475b4bccc9e3b09d41e1f81469f750f21fbf30 (patch)
treee6987f71bf349dd7812b8022a5e9cb952110b36a /client
parente2086217131c7e2c3c9df87fb25da9603dd99091 (diff)
downloadvaadin-framework-2a475b4bccc9e3b09d41e1f81469f750f21fbf30.tar.gz
vaadin-framework-2a475b4bccc9e3b09d41e1f81469f750f21fbf30.zip
Avoid attempting to use a DOM node as an element (#10480)
Change-Id: I05023392ebe99635ebe1700b14e84a317f4d6cb8
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java b/client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java
index ae14218fff..ac1ae72877 100644
--- a/client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java
+++ b/client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java
@@ -84,7 +84,14 @@ public class VDragAndDropManager {
currentDrag.setCurrentGwtEvent(nativeEvent);
updateDragImagePosition();
- Element targetElement = Element.as(nativeEvent.getEventTarget());
+ Node targetNode = Node.as(nativeEvent.getEventTarget());
+ Element targetElement;
+ if (Element.is(targetNode)) {
+ targetElement = Element.as(targetNode);
+ } else {
+ targetElement = targetNode.getParentElement();
+ }
+
if (Util.isTouchEvent(nativeEvent)
|| (dragElement != null && dragElement
.isOrHasChild(targetElement))) {