From cd0b3f85fb5699af74df6b44dfe089fbeaa15adf Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Wed, 20 Apr 2011 07:32:26 +0000 Subject: [PATCH] merging fixes from 6.5 svn changeset:18403/svn branch:6.6 --- .../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 5303970b12..dd09559078 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 - && !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 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