[fusion-commits] r2534 - trunk/lib

svn_fusion at osgeo.org svn_fusion at osgeo.org
Mon Apr 30 15:56:16 EDT 2012


Author: madair
Date: 2012-04-30 12:56:16 -0700 (Mon, 30 Apr 2012)
New Revision: 2534

Modified:
   trunk/lib/IE9patch.js
Log:
fix an error where extra attributes passed in with the tag

Modified: trunk/lib/IE9patch.js
===================================================================
--- trunk/lib/IE9patch.js	2012-04-23 06:43:43 UTC (rev 2533)
+++ trunk/lib/IE9patch.js	2012-04-30 19:56:16 UTC (rev 2534)
@@ -1,5 +1,9 @@
 document.newElement = function(tag, props) {
     var createdElement;
+    var temp = tag.split(' ').shift();//error in IE if tag has extra attributes listed
+                                      //just strip off the tag name, properties should
+                                      //set through the props argument
+
     if (Browser.Engine.trident && props){
         ['name', 'type', 'checked'].each(function(attribute){
             if (!props[attribute]) return;
@@ -13,12 +17,12 @@
             createdElement = this.createElement(replaceTag);
         }
         catch (e) {
-            createdElement = this.createElement(tag);
+            createdElement = this.createElement(temp);
         }
     }
     else {
         createdElement = this.createElement(tag);
     }
 
-    return document.id(this.createElement(tag)).set(props);
-};
\ No newline at end of file
+    return document.id(this.createElement(temp)).set(props);
+};



More information about the fusion-commits mailing list