diff options
Diffstat (limited to 'src/com/vaadin/ui/CssLayout.java')
-rw-r--r-- | src/com/vaadin/ui/CssLayout.java | 9 |
1 files changed, 7 insertions, 2 deletions
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)); } /** |