summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2013-08-29 15:46:54 +0300
committerLeif Åstrand <leif@vaadin.com>2013-08-30 08:13:54 +0300
commitbea7fa3430c6f90013e2c9178841120ff3097b1a (patch)
tree17f27465c9678f1b29bd974282fe76c6624f973c
parent6dc46c5cfc66defaa7ed2350f20bf2224b419d82 (diff)
downloadvaadin-framework-bea7fa3430c6f90013e2c9178841120ff3097b1a.tar.gz
vaadin-framework-bea7fa3430c6f90013e2c9178841120ff3097b1a.zip
Only consider caption tooltips for own slots (#12469)
Change-Id: I2d804b460fbca7cb7dbea01c88ae3dc7e63f344d
-rw-r--r--client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java1
-rw-r--r--uitest/src/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionTooltip.html33
2 files changed, 34 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java b/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java
index 45cc18f3dc..e0dc0d51df 100644
--- a/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java
+++ b/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java
@@ -375,6 +375,7 @@ public abstract class AbstractOrderedLayoutConnector extends
Slot slot = Util.findWidget(
(com.google.gwt.user.client.Element) element, Slot.class);
if (slot != null && slot.getCaptionElement() != null
+ && slot.getParent() == getWidget()
&& slot.getCaptionElement().isOrHasChild(element)) {
ComponentConnector connector = Util.findConnectorFor(slot
.getWidget());
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionTooltip.html b/uitest/src/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionTooltip.html
new file mode 100644
index 0000000000..4f574a92c7
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionTooltip.html
@@ -0,0 +1,33 @@
+<?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.applicationcontext.CloseSession?restartApplication&amp;debug</td>
+ <td></td>
+</tr>
+<!-- Show tooltip for the Events caption -->
+<tr>
+ <td>showTooltip</td>
+ <td>//div[@id='gwt-uid-4']/span</td>
+ <td></td>
+</tr>
+<!-- Verify that there's no error notification -->
+<tr>
+ <td>assertElementNotPresent</td>
+ <td>vaadin=runcomvaadintestsapplicationcontextCloseSession::Root/VNotification[0]</td>
+ <td></td>
+</tr>
+</tbody></table>
+</body>
+</html>