X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fforms%2Fplugin.js;h=5caac871481df9e1fedf0acc3d3332aeac8ade4c;hb=refs%2Ftags%2Fv3.6;hp=3be5c3b6606936a5cb16f76a19112d433f09deea;hpb=1056598c95187351dc58f4991d331e2258d038b5;p=ckeditor.git diff --git a/_source/plugins/forms/plugin.js b/_source/plugins/forms/plugin.js index 3be5c3b..5caac87 100644 --- a/_source/plugins/forms/plugin.js +++ b/_source/plugins/forms/plugin.js @@ -261,24 +261,28 @@ CKEDITOR.plugins.add( 'forms', if ( CKEDITOR.env.ie ) { - CKEDITOR.dom.element.prototype.hasAttribute = function( name ) - { - var $attr = this.$.attributes.getNamedItem( name ); - - if ( this.getName() == 'input' ) + CKEDITOR.dom.element.prototype.hasAttribute = CKEDITOR.tools.override( CKEDITOR.dom.element.prototype.hasAttribute, + function( original ) { - switch ( name ) - { - case 'class' : - return this.$.className.length > 0; - case 'checked' : - return !!this.$.checked; - case 'value' : - var type = this.getAttribute( 'type' ); - return type == 'checkbox' || type == 'radio' ? this.$.value != 'on' : this.$.value; - } - } + return function( name ) + { + var $attr = this.$.attributes.getNamedItem( name ); + + if ( this.getName() == 'input' ) + { + switch ( name ) + { + case 'class' : + return this.$.className.length > 0; + case 'checked' : + return !!this.$.checked; + case 'value' : + var type = this.getAttribute( 'type' ); + return type == 'checkbox' || type == 'radio' ? this.$.value != 'on' : this.$.value; + } + } - return !!( $attr && $attr.specified ); - }; + return original.apply( this, arguments ); + }; + }); }