handle revert on event handling - use createDelegate
[roojs1] / roojs-debug.js
index c7270b5..b9b1af1 100644 (file)
@@ -6074,11 +6074,9 @@ Roo.util.Observable.releaseCapture = function(o){
             var ls = this.listeners, scope, len = ls.length;
             if(len > 0){
                 this.firing = true;
-                
+               var args = Array.prototype.slice.call(arguments, 0);                
                 for(var i = 0; i < len; i++){
-                   var args = Array.prototype.slice.call(arguments, 0);
                    var l = ls[i];
-                   args.push(l.options);
                     if(l.fireFn.apply(l.scope||this.obj||window, args) === false){
                         this.firing = false;
                         return false;
@@ -13304,6 +13302,9 @@ mc.add(otherEl);
  * @return {Object} The item associated with the passed key.
  */
     item : function(key){
+        if (key === 'length') {
+            return null;
+        }
         var item = typeof this.map[key] != "undefined" ? this.map[key] : this.items[key];
         return typeof item != 'function' || this.allowFunctions ? item : null; // for prototype!
     },
@@ -47882,14 +47883,20 @@ clientValidation  Boolean          Applies to submit only.  Pass true to call fo
         
         // use formdata
         if (typeof(FormData) != 'undefined' && asString !== true) {
-            var fd = (new FormData(this.el.dom)).entries();
-            var ret = {};
-            var ent = fd.next();
-            while (!ent.done) {
-                ret[ent.value[0]] = ent.value[1]; // not sure how this will handle duplicates..
-                ent = fd.next();
-            };
-            return ret;
+            // this relies on a 'recent' version of chrome apparently...
+            try {
+                var fd = (new FormData(this.el.dom)).entries();
+                var ret = {};
+                var ent = fd.next();
+                while (!ent.done) {
+                    ret[ent.value[0]] = ent.value[1]; // not sure how this will handle duplicates..
+                    ent = fd.next();
+                };
+                return ret;
+            } catch(e) {
+                
+            }
+            
         }