From c0fe99a35ea6a492945824a1c55574049b60e489 Mon Sep 17 00:00:00 2001 From: Jonatan Kronqvist Date: Thu, 7 Apr 2011 07:43:26 +0000 Subject: [PATCH] Test case and fix for #6784 svn changeset:18144/svn branch:6.5 --- .../terminal/gwt/client/ui/VWindow.java | 3 ++- .../window/HugeWindowShouldBeClosable.java | 27 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 tests/src/com/vaadin/tests/components/window/HugeWindowShouldBeClosable.java diff --git a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java index c564a59423..67d90d3564 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java @@ -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 - && !DOM.isOrHasChild(contentPanel.getElement(), target)) { + && !DOM.isOrHasChild(contentPanel.getElement(), 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 index 0000000000..30757735ed --- /dev/null +++ b/tests/src/com/vaadin/tests/components/window/HugeWindowShouldBeClosable.java @@ -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; + } + +} -- 2.39.5