Changeset 1010
- Timestamp:
- 10/10/07 15:18:41 (6 years ago)
- Location:
- FCKeditor/trunk/editor/_source
- Files:
-
- 2 edited
-
classes/fckstyle.js (modified) (2 diffs)
-
internals/fckdomtools.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/editor/_source/classes/fckstyle.js
r959 r1010 468 468 // has matches in the attribute value. 469 469 if ( attValue == null || 470 ( typeof attValue == 'string' && element.getAttribute( attName, 2) == attValue ) ||471 attValue.test( element.getAttribute( attName, 2) ) )470 ( typeof attValue == 'string' && FCKDomTools.GetAttributeValue( element, attName ) == attValue ) || 471 attValue.test( FCKDomTools.GetAttributeValue( element, attName ) ) ) 472 472 return true ; 473 473 } … … 618 618 // has matches in the attribute value. 619 619 if ( attValue == null || 620 ( attValue.test && attValue.test( element.getAttribute( attName, 2) ) ) ||621 ( typeof attValue == 'string' && element.getAttribute( attName, 2) == attValue ) )620 ( attValue.test && attValue.test( FCKDomTools.GetAttributeValue( element, attName ) ) ) || 621 ( typeof attValue == 'string' && FCKDomTools.GetAttributeValue( element, attName ) == attValue ) ) 622 622 FCKDomTools.RemoveAttribute( element, attName ) ; 623 623 } -
FCKeditor/trunk/editor/_source/internals/fckdomtools.js
r1002 r1010 446 446 for ( var i = 0 ; i < attributes.length ; i++ ) 447 447 { 448 if ( attributes[i].specified ) 448 if ( FCKBrowserInfo.IsIE && attributes[i].nodeName == 'class' ) 449 { 450 // IE has a strange bug. If calling removeAttribute('className'), 451 // the attributes collection will still contain the "class" 452 // attribute, which will be marked as "specified", even if the 453 // outerHTML of the element is not displaying the class attribute. 454 // Note : I was not able to reproduce it outside the editor, 455 // but I've faced it while working on the TC of #1391. 456 if ( element.className.length > 0 ) 457 return true ; 458 } 459 else if ( attributes[i].specified ) 449 460 return true ; 450 461 } … … 461 472 attributeName = 'className' ; 462 473 463 return element.removeAttribute( attributeName ) ; 464 }, 465 474 return element.removeAttribute( attributeName, 0 ) ; 475 }, 466 476 467 477 GetAttributeValue : function( element, att )
Note: See TracChangeset
for help on using the changeset viewer.
