diff options
author | Pontus Boström <pontus@vaadin.com> | 2015-11-20 17:08:44 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-05-12 07:05:33 +0000 |
commit | dfcc4949ca445b55bc004ef96da8ae28aa343018 (patch) | |
tree | a91d64b5a2a7cb5671b1b75035fb41aec961db3a /client | |
parent | b3b5c062b02ca5edfc5527090c027145704ee51a (diff) | |
download | vaadin-framework-dfcc4949ca445b55bc004ef96da8ae28aa343018.tar.gz vaadin-framework-dfcc4949ca445b55bc004ef96da8ae28aa343018.zip |
Fixed tooltips for sub-windows (#19073)
The subwindows tooltip is now also shown in header and footer of the
subwindow. Added also tests for the feature.
Change-Id: I933dad9e8530ce20b930fe22caf9e79a3ad3e3d2
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/ui/VWindow.java | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/VWindow.java b/client/src/main/java/com/vaadin/client/ui/VWindow.java index 737af90b1f..de465f6c1f 100644 --- a/client/src/main/java/com/vaadin/client/ui/VWindow.java +++ b/client/src/main/java/com/vaadin/client/ui/VWindow.java @@ -997,21 +997,35 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, event.preventDefault(); headerDragPending = event; - } else if ((type == Event.ONMOUSEMOVE || type == Event.ONTOUCHMOVE) + bubble = false; + } else if (type == Event.ONMOUSEMOVE && headerDragPending != null) { // ie won't work unless this is set here dragging = true; onDragEvent(headerDragPending); onDragEvent(event); headerDragPending = null; + bubble = false; + } else if (type != Event.ONMOUSEMOVE) { + // The event can propagate to the parent in case it is a + // mouse move event. This is needed for tooltips to work in + // header and footer, see Ticket #19073 + headerDragPending = null; + bubble = false; } else { headerDragPending = null; } - bubble = false; } if (type == Event.ONCLICK) { activateOnClick(); } + } else if (footer.isOrHasChild(target) && !dragging) { + onDragEvent(event); + if (type != Event.ONMOUSEMOVE) { + // This is needed for tooltips to work in header and footer, see + // Ticket #19073 + bubble = false; + } } else if (dragging || !contents.isOrHasChild(target)) { onDragEvent(event); bubble = false; @@ -1031,11 +1045,10 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, if (!bubble) { event.stopPropagation(); - } else { - // Super.onBrowserEvent takes care of Handlers added by the - // ClickEventHandler - super.onBrowserEvent(event); } + // Super.onBrowserEvent takes care of Handlers added by the + // ClickEventHandler + super.onBrowserEvent(event); } private void activateOnClick() { |