diff options
author | Johannes Dahlström <johannes.dahlstrom@vaadin.com> | 2012-06-14 08:18:04 +0000 |
---|---|---|
committer | Johannes Dahlström <johannes.dahlstrom@vaadin.com> | 2012-06-14 08:18:04 +0000 |
commit | 835c03b8633454861b491dd6053a990579e19de8 (patch) | |
tree | 9b6fdb660270504e78f6392cfbd1f71643329ed1 /src | |
parent | 6fc4fd79a6b96bcdd66058173e78beec3d9ce9ac (diff) | |
download | vaadin-framework-835c03b8633454861b491dd6053a990579e19de8.tar.gz vaadin-framework-835c03b8633454861b491dd6053a990579e19de8.zip |
#7766 Applied Sami's patch
svn changeset:23935/svn branch:6.8
Diffstat (limited to 'src')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java b/src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java index ff649ebeb1..c16ad8a76f 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java @@ -62,6 +62,8 @@ public class VDragAndDropWrapper extends VCustomComponent implements private static final String CLASSNAME = "v-ddwrapper"; protected static final String DRAGGABLE = "draggable"; + private boolean hasTooltip = false; + public VDragAndDropWrapper() { super(); sinkEvents(VTooltip.TOOLTIP_EVENTS); @@ -94,7 +96,8 @@ public class VDragAndDropWrapper extends VCustomComponent implements public void onBrowserEvent(Event event) { super.onBrowserEvent(event); - if (client != null) { + if (hasTooltip && client != null) { + // Override child tooltips if the wrapper has a tooltip defined client.handleTooltipEvent(event, this); } } @@ -158,6 +161,10 @@ public class VDragAndDropWrapper extends VCustomComponent implements this.client = client; super.updateFromUIDL(uidl, client); if (!uidl.hasAttribute("cached") && !uidl.hasAttribute("hidden")) { + + // Used to prevent wrapper from stealing tooltips when not defined + hasTooltip = uidl.hasAttribute("description"); + UIDL acceptCrit = uidl.getChildByTagName("-ac"); if (acceptCrit == null) { dropHandler = null; |