]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix for #4067 - SplitPanel in modal window freezes application (Gecko+Webkit)
authorArtur Signell <artur.signell@itmill.com>
Mon, 25 Jan 2010 14:02:08 +0000 (14:02 +0000)
committerArtur Signell <artur.signell@itmill.com>
Mon, 25 Jan 2010 14:02:08 +0000 (14:02 +0000)
Modal window now lets all events through when capture element is set

svn changeset:10990/svn branch:6.2

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

index 27fdf9506fa4511a7b181c0f80034fb30b6927d4..d7a11427fb92e957bfba2f0a80a2a8332c7f6c69 100644 (file)
@@ -16,7 +16,6 @@ import com.google.gwt.user.client.DeferredCommand;
 import com.google.gwt.user.client.Element;
 import com.google.gwt.user.client.Event;
 import com.google.gwt.user.client.ui.ComplexPanel;
-import com.google.gwt.user.client.ui.RootPanel;
 import com.google.gwt.user.client.ui.Widget;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.BrowserInfo;
@@ -503,7 +502,7 @@ public class VSplitPanel extends ComplexPanel implements Container,
             DOM.setStyleAttribute(draggingCurtain, "zIndex", ""
                     + VOverlay.Z_INDEX);
 
-            DOM.appendChild(RootPanel.getBodyElement(), draggingCurtain);
+            DOM.appendChild(wrapper, draggingCurtain);
         }
     }
 
@@ -521,7 +520,7 @@ public class VSplitPanel extends ComplexPanel implements Container,
      */
     private void hideDraggingCurtain() {
         if (draggingCurtain != null) {
-            DOM.removeChild(RootPanel.getBodyElement(), draggingCurtain);
+            DOM.removeChild(wrapper, draggingCurtain);
             draggingCurtain = null;
         }
     }
index e1ab149dc539211687775e0c0340885f5fbde5a6..0cae63b8ca63c4221605160562bc29b8eea9659b 100644 (file)
@@ -1065,6 +1065,10 @@ public class VWindow extends VOverlay implements Container, ScrollListener {
         } else if (vaadinModality) {
             // return false when modal and outside window
             final Element target = event.getTarget().cast();
+            if (DOM.getCaptureElement() != null) {
+                // Allow events when capture is set
+                return true;
+            }
 
             if (!DOM.isOrHasChild(getElement(), target)) {
                 // not within the modal window, but let's see if it's in the