]> source.dussan.org Git - vaadin-framework.git/commitdiff
merging fixes from 6.5
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 20 Apr 2011 07:32:26 +0000 (07:32 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 20 Apr 2011 07:32:26 +0000 (07:32 +0000)
svn changeset:18403/svn branch:6.6

src/com/vaadin/terminal/gwt/client/ui/VWindow.java
tests/src/com/vaadin/tests/components/window/HugeWindowShouldBeClosable.java [new file with mode: 0644]

index 5303970b122ae740c76fd27e54a4ee269d96af7b..dd0955907829049e1b5af4569c5a7351e917fe05 100644 (file)
@@ -903,7 +903,8 @@ public class VWindow extends VOverlay implements Container,
          * After that this windows e.g. gets all keyboard shortcuts.
          */
         if (type == Event.ONMOUSEDOWN
-                && !contentPanel.getElement().isOrHasChild(target)) {
+                && !contentPanel.getElement().isOrHasChild(target)
+                && target != closeBox) {
             contentPanel.focus();
         }
 
diff --git a/tests/src/com/vaadin/tests/components/window/HugeWindowShouldBeClosable.java b/tests/src/com/vaadin/tests/components/window/HugeWindowShouldBeClosable.java
new file mode 100644 (file)
index 0000000..3075773
--- /dev/null
@@ -0,0 +1,27 @@
+package com.vaadin.tests.components.window;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Window;
+
+public class HugeWindowShouldBeClosable extends TestBase {
+
+    @Override
+    protected void setup() {
+        Window w = new Window("Hueg");
+        w.setWidth("2000px");
+        w.setHeight("2000px");
+        w.setPositionY(500);
+        getMainWindow().addWindow(w);
+    }
+
+    @Override
+    protected String getDescription() {
+        return "Huge windows should be closable";
+    }
+
+    @Override
+    protected Integer getTicketNumber() {
+        return -1;
+    }
+
+}