]> source.dussan.org Git - vaadin-framework.git/commitdiff
Additional fix for #3982 & #3986
authorArtur Signell <artur.signell@itmill.com>
Fri, 15 Jan 2010 08:45:03 +0000 (08:45 +0000)
committerArtur Signell <artur.signell@itmill.com>
Fri, 15 Jan 2010 08:45:03 +0000 (08:45 +0000)
svn changeset:10727/svn branch:6.2

src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java

index aff464789de83a0c974b4fedd1900b6e9a1c8e4b..8ed26110315750bf9c52cdbf51db1b49e2e61dcb 100644 (file)
@@ -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;
         }
     }