]> source.dussan.org Git - vaadin-framework.git/commitdiff
Register CssLayout click listeners in onStateChanged instead of onConnectorHierarchyC... 42/142/1
authorJohannes Dahlström <johannesd@vaadin.com>
Fri, 19 Oct 2012 15:21:46 +0000 (18:21 +0300)
committerJohannes Dahlström <johannesd@vaadin.com>
Fri, 19 Oct 2012 15:23:25 +0000 (18:23 +0300)
Test case (tests.components.ClickListeners) committed as part of #9956

Change-Id: I35f41a301ceebc43679098ae033656a18b82c4b1

client/src/com/vaadin/client/ui/csslayout/CssLayoutConnector.java

index 12ebb6a375c7f9eeec37a33bc8cd2a0636605ea9..cfdda3dd1c7b4f9f7fb1ff51a786133a09cce5a7 100644 (file)
@@ -93,6 +93,7 @@ public class CssLayoutConnector extends AbstractLayoutConnector {
     @Override
     public void onStateChanged(StateChangeEvent stateChangeEvent) {
         super.onStateChanged(stateChangeEvent);
+        clickEventHandler.handleEventHandlerRegistration();
 
         for (ComponentConnector child : getChildComponents()) {
             if (!getState().childCss.containsKey(child)) {
@@ -123,8 +124,6 @@ public class CssLayoutConnector extends AbstractLayoutConnector {
      */
     @Override
     public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
-        clickEventHandler.handleEventHandlerRegistration();
-
         int index = 0;
         for (ComponentConnector child : getChildComponents()) {
             VCaption childCaption = childToCaption.get(child);