--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.combobox.ComboBoxInPopup?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxInPopup::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]/domChild[1]</td>
+ <td>12,13</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxInPopup::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td>
+ <td>Yes</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxInPopup::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td>
+ <td>esc</td>
+</tr>
+<!--ensure the sub window is still open but the popup is not-->
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxInPopup::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td>
+ <td>A combo box</td>
+</tr>
+<tr>
+ <td>assertElementNotPresent</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxInPopup::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
--- /dev/null
+package com.vaadin.tests.components.combobox;
+
+import com.vaadin.event.ShortcutAction.KeyCode;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.ComboBox;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.Window;
+
+public class ComboBoxInPopup extends TestBase {
+
+ @Override
+ protected void setup() {
+ final Window w = new Window();
+ w.getContent().setSizeUndefined();
+ w.addComponent(createComboBox());
+ Button close = new Button("Close window", new Button.ClickListener() {
+
+ public void buttonClick(ClickEvent event) {
+ w.getParent().removeWindow(w);
+ }
+ });
+ close.setClickShortcut(KeyCode.ESCAPE, null);
+ w.addComponent(close);
+
+ getLayout().getWindow().addWindow(w);
+
+ }
+
+ private Component createComboBox() {
+ ComboBox cb = new ComboBox("A combo box");
+
+ cb.addItem("Yes");
+ cb.addItem("No");
+ cb.addItem("Maybe");
+ return cb;
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Escape is a shortcut for the close button. Pressing escape when the popup is open should cause only the popup to close, not the window.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 6978;
+ }
+
+}