Ticket #3500: 3500_2.patch
File 3500_2.patch, 2.0 KB (added by , 15 years ago) |
---|
-
_source/core/dom/element.js
800 800 : 801 801 function() 802 802 { 803 return this.$.attributes.length > 0; 803 var attributes = this.$.attributes; 804 return ( attributes.length > 1 || ( attributes.length == 1 && attributes[0].nodeName != '_cke_expando' ) ); 804 805 }, 805 806 806 807 /** … … 954 955 { 955 956 if ( name == 'class' ) 956 957 name = 'className'; 958 else if ( name == 'tabindex' ) 959 name = 'tabIndex'; 957 960 standard.call( this, name ); 958 961 }; 959 962 } -
_source/tests/core/dom/element.html
407 407 test_getAttribute_ignoreExpandoAttributes : function() 408 408 { 409 409 var element = new CKEDITOR.dom.element( document.getElementById( 'testExpandoAttributes' ) ); 410 assert.areEqual( 1, element.getAttribute( 'tabindex' ) ); 410 411 assert.areEqual( 1, element.getAttribute( 'tabindex' ), 'tabindex is wrong' ); 411 412 element.removeAttribute( 'tabindex' ); 412 assert.areEqual( 'hasExpando', element.getAttribute( 'class' ) ); 413 414 assert.areEqual( 'hasExpando', element.getAttribute( 'class' ), 'class is wrong' ); 413 415 element.removeAttribute( 'class' ); 414 if( CKEDITOR.env.ie ) 415 assert.areEqual( 'FLOAT: right', element.getAttribute( 'style' ) ); 416 else 417 assert.areEqual( 'float: right;', element.getAttribute( 'style' ) ); 416 417 assert.areEqual( 'float:right', element.getAttribute( 'style' ).toLowerCase().replace( /[ ;]/g, '' ) ); 418 418 419 element.removeAttribute( 'style' ); 419 420 element.removeAttribute( 'id' ); 420 assert.isFalse( element.hasAttributes() );421 assert.isFalse( element.hasAttributes(), 'hasAttributes should be false' ); 421 422 }, 422 423 423 424 test_getTabIndex1 : function()