--- /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.popupview.ReopenPopupView?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentspopupviewReopenPopupView::/VVerticalLayout[0]/VVerticalLayout[0]/VPopupView[0]</td>
+ <td>42,5</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//span/span</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentspopupviewReopenPopupView::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[0]</td>
+ <td>1. Button clicked</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//span/span</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentspopupviewReopenPopupView::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[0]</td>
+ <td>2. Button clicked</td>
+</tr>
+<!--Click outside to close PopupView-->
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentspopupviewReopenPopupView::</td>
+ <td>304,229</td>
+</tr>
+<tr>
+ <td>pause</td>
+ <td></td>
+ <td>1000</td>
+</tr>
+<!--Open PopupView again and click button-->
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentspopupviewReopenPopupView::/VVerticalLayout[0]/VVerticalLayout[0]/VPopupView[0]</td>
+ <td>33,6</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//span/span</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentspopupviewReopenPopupView::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[0]</td>
+ <td>3. Button clicked</td>
+</tr>
+</tbody></table>
+</body>
+</html>
--- /dev/null
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.tests.components.popupview;
+
+import com.vaadin.terminal.WrappedRequest;
+import com.vaadin.tests.components.AbstractTestRoot;
+import com.vaadin.tests.util.Log;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.PopupView;
+
+public class ReopenPopupView extends AbstractTestRoot {
+ private final Log log = new Log(5);
+
+ @Override
+ protected void setup(WrappedRequest request) {
+ addComponent(log);
+ addComponent(new PopupView("PopupView", new Button("Button",
+ new Button.ClickListener() {
+ public void buttonClick(ClickEvent event) {
+ log.log("Button clicked");
+ }
+ })));
+ }
+
+ @Override
+ protected String getTestDescription() {
+ return "Clicking a button in a PopupView should work every time";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return Integer.valueOf(8804);
+ }
+
+}