JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.6
[ckeditor.git] / _source / plugins / forms / plugin.js
index 3be5c3b..5caac87 100644 (file)
@@ -261,24 +261,28 @@ CKEDITOR.plugins.add( 'forms',
 \r
 if ( CKEDITOR.env.ie )\r
 {\r
-       CKEDITOR.dom.element.prototype.hasAttribute = function( name )\r
-       {\r
-               var $attr = this.$.attributes.getNamedItem( name );\r
-\r
-               if ( this.getName() == 'input' )\r
+       CKEDITOR.dom.element.prototype.hasAttribute = CKEDITOR.tools.override( CKEDITOR.dom.element.prototype.hasAttribute,\r
+               function( original )\r
                {\r
-                       switch ( name )\r
-                       {\r
-                               case 'class' :\r
-                                       return this.$.className.length > 0;\r
-                               case 'checked' :\r
-                                       return !!this.$.checked;\r
-                               case 'value' :\r
-                                       var type = this.getAttribute( 'type' );\r
-                                       return type == 'checkbox' || type == 'radio' ? this.$.value != 'on' : this.$.value;\r
-                       }\r
-               }\r
+                       return function( name )\r
+                               {\r
+                                       var $attr = this.$.attributes.getNamedItem( name );\r
+\r
+                                       if ( this.getName() == 'input' )\r
+                                       {\r
+                                               switch ( name )\r
+                                               {\r
+                                                       case 'class' :\r
+                                                               return this.$.className.length > 0;\r
+                                                       case 'checked' :\r
+                                                               return !!this.$.checked;\r
+                                                       case 'value' :\r
+                                                               var type = this.getAttribute( 'type' );\r
+                                                               return type == 'checkbox' || type == 'radio' ? this.$.value != 'on' : this.$.value;\r
+                                               }\r
+                                       }\r
 \r
-               return !!( $attr && $attr.specified );\r
-       };\r
+                                       return original.apply( this, arguments );\r
+                               };\r
+               });\r
 }\r