summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/vaadin/ui')
-rw-r--r--src/com/vaadin/ui/AbsoluteLayout.java9
-rw-r--r--src/com/vaadin/ui/AbstractOrderedLayout.java9
-rw-r--r--src/com/vaadin/ui/CssLayout.java9
-rw-r--r--src/com/vaadin/ui/GridLayout.java9
4 files changed, 28 insertions, 8 deletions
diff --git a/src/com/vaadin/ui/AbsoluteLayout.java b/src/com/vaadin/ui/AbsoluteLayout.java
index 538cc26c77..a30cae529b 100644
--- a/src/com/vaadin/ui/AbsoluteLayout.java
+++ b/src/com/vaadin/ui/AbsoluteLayout.java
@@ -585,9 +585,14 @@ public class AbsoluteLayout extends AbstractLayout {
private void fireClick(Map<String, Object> parameters) {
MouseEventDetails mouseDetails = MouseEventDetails
.deSerialize((String) parameters.get("mouseDetails"));
- Component childComponent = (Component) parameters.get("component");
+ Component clickedComponent = (Component) parameters.get("component");
+ Component childComponent = clickedComponent;
+ while (childComponent != null && !components.contains(childComponent)) {
+ childComponent = childComponent.getParent();
+ }
- fireEvent(new LayoutClickEvent(this, mouseDetails, childComponent));
+ fireEvent(new LayoutClickEvent(this, mouseDetails, clickedComponent,
+ childComponent));
}
/**
diff --git a/src/com/vaadin/ui/AbstractOrderedLayout.java b/src/com/vaadin/ui/AbstractOrderedLayout.java
index 7bd52f8feb..28d6f66792 100644
--- a/src/com/vaadin/ui/AbstractOrderedLayout.java
+++ b/src/com/vaadin/ui/AbstractOrderedLayout.java
@@ -363,9 +363,14 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
private void fireClick(Map<String, Object> parameters) {
MouseEventDetails mouseDetails = MouseEventDetails
.deSerialize((String) parameters.get("mouseDetails"));
- Component childComponent = (Component) parameters.get("component");
+ Component clickedComponent = (Component) parameters.get("component");
+ Component childComponent = clickedComponent;
+ while (childComponent != null && !components.contains(childComponent)) {
+ childComponent = childComponent.getParent();
+ }
- fireEvent(new LayoutClickEvent(this, mouseDetails, childComponent));
+ fireEvent(new LayoutClickEvent(this, mouseDetails, clickedComponent,
+ childComponent));
}
/**
diff --git a/src/com/vaadin/ui/CssLayout.java b/src/com/vaadin/ui/CssLayout.java
index db5bae678b..5953ba5181 100644
--- a/src/com/vaadin/ui/CssLayout.java
+++ b/src/com/vaadin/ui/CssLayout.java
@@ -264,9 +264,14 @@ public class CssLayout extends AbstractLayout {
private void fireClick(Map<String, Object> parameters) {
MouseEventDetails mouseDetails = MouseEventDetails
.deSerialize((String) parameters.get("mouseDetails"));
- Component childComponent = (Component) parameters.get("component");
+ Component clickedComponent = (Component) parameters.get("component");
+ Component childComponent = clickedComponent;
+ while (childComponent != null && !components.contains(childComponent)) {
+ childComponent = childComponent.getParent();
+ }
- fireEvent(new LayoutClickEvent(this, mouseDetails, childComponent));
+ fireEvent(new LayoutClickEvent(this, mouseDetails, clickedComponent,
+ childComponent));
}
/**
diff --git a/src/com/vaadin/ui/GridLayout.java b/src/com/vaadin/ui/GridLayout.java
index fc16daa7c7..503b3d2b8e 100644
--- a/src/com/vaadin/ui/GridLayout.java
+++ b/src/com/vaadin/ui/GridLayout.java
@@ -1392,9 +1392,14 @@ public class GridLayout extends AbstractLayout implements
private void fireClick(Map<String, Object> parameters) {
MouseEventDetails mouseDetails = MouseEventDetails
.deSerialize((String) parameters.get("mouseDetails"));
- Component childComponent = (Component) parameters.get("component");
+ Component clickedComponent = (Component) parameters.get("component");
+ Component childComponent = clickedComponent;
+ while (childComponent != null && !components.contains(childComponent)) {
+ childComponent = childComponent.getParent();
+ }
- fireEvent(new LayoutClickEvent(this, mouseDetails, childComponent));
+ fireEvent(new LayoutClickEvent(this, mouseDetails, clickedComponent,
+ childComponent));
}
/**