[Commits] r206 - sandbox/opengeo/drake/trunk/apps/drake

commits at geoext.org commits at geoext.org
Fri Feb 20 00:00:48 CET 2009


Author: tcoulter
Date: 2009-02-20 00:00:48 +0100 (Fri, 20 Feb 2009)
New Revision: 206

Modified:
   sandbox/opengeo/drake/trunk/apps/drake/LayerNodeUI.js
Log:
Sticking target.click() in the if statement for safe-keeping. Even if it doesn't cause an infinite loop, no use risking it.

Modified: sandbox/opengeo/drake/trunk/apps/drake/LayerNodeUI.js
===================================================================
--- sandbox/opengeo/drake/trunk/apps/drake/LayerNodeUI.js	2009-02-19 17:33:12 UTC (rev 205)
+++ sandbox/opengeo/drake/trunk/apps/drake/LayerNodeUI.js	2009-02-19 23:00:48 UTC (rev 206)
@@ -47,16 +47,11 @@
                     // the browserEvent's "isTrusted" parameter to see which click we're
                     // responding to. If "isTrusted" is true, then this event is the original
                     // event fired by the browser, and not the one fired by target.click().
-                    //
-                    // Oddly, due to the radio button already being clicked, target.click() 
-                    // must not keep firing the click event, or else this function would cause 
-                    // an infinite loop.
                     if (evt.browserEvent.isTrusted == true) {
                         this.node.ownerTree.fireEvent("layeractivated", this.node.layer);
+                        target.click();
                     }
                     
-                    target.click();
-                    
                     return true;
                 }, this);
             }



More information about the Commits mailing list