Author: hlship
Date: Tue Aug 31 18:44:07 2010
New Revision: 991288

URL: http://svn.apache.org/viewvc?rev=991288&view=rev
Log:
TAP5-1192: IE 8 throws an exception while purging JavaScript event handlers 
from elements as they are destroyed

Modified:
    
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js?rev=991288&r1=991287&r2=991288&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
 Tue Aug 31 18:44:07 2010
@@ -637,8 +637,8 @@ var Tapestry = {
                /* Adapted from 
http://javascript.crockford.com/memory/leak.html */
                var attrs = element.attributes;
                if (attrs) {
-                       var l = attrs.length, i, name;
-                       for (i = 0; i < l; i++) {
+                       var i, name;
+                       for (i = attrs.length - 1; i >=0; i--) {
                 if (attrs[i]) {
                     name = attrs[i].name;
                     /* Looking for onclick, etc. */


Reply via email to