Layout click listener problem

Hi,
I’m using horizontal layout, and i’ve tried to add to it a Listener. Wired thing is that after a click shows that getClickedComponent is null.

[code]
this.horizontalLayout.addLayoutClickListener(new LayoutEvents.LayoutClickListener() {

        @Override
        public void layoutClick(final LayoutEvents.LayoutClickEvent event) {
            vaadinUtils.publishToBrowser(new Runnable() {

                @Override
                public void run() {
                    if (null != event.getClickedComponent() && event.getClickedComponent() instanceof HorizontalLayout) {
                        doMyStuff();
                    }
                }
            });

        }
    });

[/code]P.S
I’m using Vaadin 7.2.2

Hmm, maybe nothing in the layout was clicked but the layout itself? If so, you can try to call the LayoutClickEvent’s getSource.

Thanks for this, this helps a lot!
Now it works!