diff options
author | Matti Tahvonen <matti@vaadin.com> | 2013-09-26 15:59:55 +0300 |
---|---|---|
committer | Matti Tahvonen <matti@vaadin.com> | 2013-09-26 16:07:39 +0300 |
commit | 8ce6565b3ee456db4f95b41568a8b31721a48cd6 (patch) | |
tree | 264cc2f3043ab459754f7aad629f084969e911ab /client/src | |
parent | bd0ae0581f265be57374b236cfe1b71043ab69aa (diff) | |
download | vaadin-framework-8ce6565b3ee456db4f95b41568a8b31721a48cd6.tar.gz vaadin-framework-8ce6565b3ee456db4f95b41568a8b31721a48cd6.zip |
Fixes normal drag and drop events (regression since 7.1) and html5 style
D&D in IE10 (#12339)
Change-Id: Ied4504406ebbeab6ff464fb239f7b3f5987fbbd9
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/com/vaadin/client/ui/VDragAndDropWrapper.java | 15 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java | 11 |
2 files changed, 21 insertions, 5 deletions
diff --git a/client/src/com/vaadin/client/ui/VDragAndDropWrapper.java b/client/src/com/vaadin/client/ui/VDragAndDropWrapper.java index 1c1173c295..ccd7e2758e 100644 --- a/client/src/com/vaadin/client/ui/VDragAndDropWrapper.java +++ b/client/src/com/vaadin/client/ui/VDragAndDropWrapper.java @@ -332,11 +332,16 @@ public class VDragAndDropWrapper extends VCustomComponent implements vaadinDragEvent.setCurrentGwtEvent(event); getDropHandler().dragOver(vaadinDragEvent); - String s = event.getEffectAllowed(); - if ("all".equals(s) || s.contains("opy")) { - event.setDropEffect("copy"); - } else { - event.setDropEffect(s); + try { + String s = event.getEffectAllowed(); + if ("all".equals(s) || s.contains("opy")) { + event.setDropEffect("copy"); + } else { + event.setDropEffect(s); + } + } catch (Exception e) { + // IE10 throws exception here in getEffectAllowed, ignore it, let + // drop effect be whatever it is } try { diff --git a/client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java b/client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java index b4cf008a38..b911c28a07 100644 --- a/client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java +++ b/client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java @@ -374,6 +374,17 @@ public class VDragAndDropManager { public void onPreviewNativeEvent( NativePreviewEvent event) { int typeInt = event.getTypeInt(); + if (typeInt == -1 + && event.getNativeEvent().getType() + .contains("MSPointer")) { + /* + * Ignore MSPointer events, until they are + * properly used (might improve usability on + * touch devices). + */ + return; + } + switch (typeInt) { case Event.ONMOUSEOVER: if (dragElement == null) { |