X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Fdom%2Felement.js;h=6e6a42c181c9a68aba087442c69e1ebf38e626dd;hb=4e70ea24db840898be8cc21c950363a52a2a6aba;hp=2f3eb0ad8e3c7effbbc17252df9a8252da97a6a3;hpb=4e90e78dc97789709ee7404359a5517540c27553;p=ckeditor.git diff --git a/_source/core/dom/element.js b/_source/core/dom/element.js index 2f3eb0a..6e6a42c 100644 --- a/_source/core/dom/element.js +++ b/_source/core/dom/element.js @@ -429,6 +429,13 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, name = 'className'; break; + case 'http-equiv': + name = 'httpEquiv'; + break; + + case 'name': + return this.$.name; + case 'tabindex': var tabIndex = standard.call( this, name ); @@ -714,6 +721,9 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, isEditable : function() { + if ( this.isReadOnly() ) + return false; + // Get the element name. var name = this.getName(); @@ -884,11 +894,28 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, * @param {String} name The attribute name. * @example */ - hasAttribute : function( name ) + hasAttribute : (function() { - var $attr = this.$.attributes.getNamedItem( name ); - return !!( $attr && $attr.specified ); - }, + function standard( name ) + { + var $attr = this.$.attributes.getNamedItem( name ); + return !!( $attr && $attr.specified ); + } + + return ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 ) ? + function( name ) + { + // On IE < 8 the name attribute cannot be retrieved + // right after the element creation and setting the + // name with setAttribute. + if ( name == 'name' ) + return !!this.$.name; + + return standard.call( this, name ); + } + : + standard; + })(), /** * Hides this element (display:none).