diff --git a/src/main/webapp/scripts/lib/spawn/spawn.js b/src/main/webapp/scripts/lib/spawn/spawn.js
index 4f847fd522b1640808940a4e93a5d3dd349cfd8d..e15024775c74933586e077a8ccdfeef36f9dcde0 100644
--- a/src/main/webapp/scripts/lib/spawn/spawn.js
+++ b/src/main/webapp/scripts/lib/spawn/spawn.js
@@ -271,6 +271,11 @@
         opts = opts || {};
         children = children || null;
 
+        // make sure [type] attribute is applied FIRST for <input> elements
+        if (/input/i.test(el.tagName) && opts.type) {
+            el.type = opts.type;
+        }
+
         if (!isVoid){
             // if 'opts' is a string,
             // set el's innerHTML and
@@ -300,6 +305,7 @@
         // IE *REALLY* hates method="PUT" on forms
         var methodPut = (opts.method && /put/i.test(opts.method));
 
+        //////////////////////////////////////////////////
         // add attributes and properties to element
         forOwn(opts, function(prop, val){
             // only add if NOT in 'skip' array
@@ -307,6 +313,8 @@
                 el[prop] = val;
             }
         });
+        //////////////////////////////////////////////////
+
 
         // explicitly add element attributes
         if (opts.attr){