Ticket #4597 (closed Bug: fixed)

Opened 5 years ago

Last modified 5 years ago

[IE] DispHTMLAttributeCollection doesn't have getAttribute() method

Reported by: pomu0325 Owned by: garry.yao
Priority: Normal Milestone: CKEditor 3.1
Component: Core : Styles Version: SVN (CKEditor) - OLD
Keywords: Review+ Cc:

Description

At line.726 of dom/element.js, it calls getAttribute method of thisAttribs(instance of DispHTMLAttributeCollection), but it fails. Instead, item() method should be used.

if ( ( !CKEDITOR.env.ie || ( attribute.specified && attribute.nodeName != '_cke_expando' ) )
 && attribute.nodeValue != thisAttribs.getAttribute( attribute.nodeName ) )

To reproduce this error,

  • Add following settings to config.js
    CKEDITOR.editorConfig = function( config )
    {
        config.coreStyles_bold = 
        { 
    		element : 'span',
    		attributes	: { 'class' : 'foo' },
    		overrides : 'b'
         };
    
        config.coreStyles_italic =
        { 
    		element : 'span',
    		attributes	: { 'class' : 'bar' },
    		overrides : 'i'
         };
    };
    
  • Open any sample page of CKEditor
  • Type some text in editor
  • Select these text
  • Click 'B'(bold) button from the toolbar
  • Click 'I'(italic) button from the toolbar twice

Attachments

4597.patch (612 bytes) - added by pomu0325 5 years ago.
4597_2.patch (691 bytes) - added by garry.yao 5 years ago.

Change History

Changed 5 years ago by pomu0325

comment:1 Changed 5 years ago by mosipov

  • Keywords Review? HasPatch added

Changed 5 years ago by garry.yao

comment:2 Changed 5 years ago by garry.yao

  • Status changed from new to assigned
  • Owner set to garry.yao
  • Version set to SVN (CKEditor)
  • Keywords HasPatch removed
  • Milestone set to CKEditor 3.1

Providing a patch based on pomu's patch. Ticket Test added at :
http://ckeditor.t/tt/4597/1.html.

comment:3 Changed 5 years ago by fredck

  • Keywords Review+ added; Review? removed

comment:4 Changed 5 years ago by garry.yao

  • Status changed from assigned to closed
  • Resolution set to fixed

Fixed with [4495].

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy