Opened 8 years ago

Closed 8 years ago

#4597 closed Bug (fixed)

[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 (2)

4597.patch (612 bytes) - added by pomu0325 8 years ago.
4597_2.patch (691 bytes) - added by Garry Yao 8 years ago.

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by pomu0325

Attachment: 4597.patch added

comment:1 Changed 8 years ago by Michael Osipov

Keywords: Review? HasPatch added

Changed 8 years ago by Garry Yao

Attachment: 4597_2.patch added

comment:2 Changed 8 years ago by Garry Yao

Keywords: HasPatch removed
Milestone: CKEditor 3.1
Owner: set to Garry Yao
Status: newassigned
Version: SVN (CKEditor)

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

comment:3 Changed 8 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:4 Changed 8 years ago by Garry Yao

Resolution: fixed
Status: assignedclosed

Fixed with [4495].

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