From 03a3c4a3069b2e3baa0973fc5115c6231e195df5 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 15 Jan 2010 08:45:03 +0000 Subject: [PATCH] Additional fix for #3982 & #3986 svn changeset:10727/svn branch:6.2 --- .../terminal/gwt/client/ui/VSplitPanel.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java b/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java index aff464789d..8ed2611031 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java @@ -371,6 +371,14 @@ public class VSplitPanel extends ComplexPanel implements Container, case Event.ONMOUSEDOWN: onMouseDown(event); break; + case Event.ONMOUSEOUT: + // Dragging curtain interferes with click events if added in + // mousedown so we add it only when needed i.e., if the mouse moves + // outside the splitter. + if (resizing && BrowserInfo.get().isGecko()) { + showDraggingCurtain(); + } + break; case Event.ONMOUSEUP: if (resizing) { onMouseUp(event); @@ -394,9 +402,6 @@ public class VSplitPanel extends ComplexPanel implements Container, if (trg == splitter || trg == DOM.getChild(splitter, 0)) { resizing = true; resized = false; - if (BrowserInfo.get().isGecko()) { - showDraggingCurtain(); - } DOM.setCapture(getElement()); origX = DOM.getElementPropertyInt(splitter, "offsetLeft"); origY = DOM.getElementPropertyInt(splitter, "offsetTop"); @@ -470,11 +475,6 @@ public class VSplitPanel extends ComplexPanel implements Container, */ private void showDraggingCurtain() { if (draggingCurtain == null) { - // Ensure splitter is above dragging curtain so events will be - // handled properly - splitter.getStyle().setProperty("zIndex", - "" + (VOverlay.Z_INDEX + 1)); - draggingCurtain = DOM.createDiv(); DOM.setStyleAttribute(draggingCurtain, "position", "absolute"); DOM.setStyleAttribute(draggingCurtain, "top", "0px"); @@ -494,9 +494,6 @@ public class VSplitPanel extends ComplexPanel implements Container, private void hideDraggingCurtain() { if (draggingCurtain != null) { DOM.removeChild(RootPanel.getBodyElement(), draggingCurtain); - - // Remove temporary splitter zIndex set in showDraggingCurtain - splitter.getStyle().setProperty("zIndex", ""); draggingCurtain = null; } } -- 2.39.5