Ticket #4597 (closed Bug: fixed)

Opened 5 months ago

Last modified 4 months 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)
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 Download (0.6 KB) - added by pomu0325 5 months ago.
4597_2.patch Download (0.7 KB) - added by garry.yao 5 months ago.

Change History

Changed 5 months ago by pomu0325

Changed 5 months ago by mosipov

  • keywords Review? HasPatch added

Changed 5 months ago by garry.yao

Changed 5 months ago by garry.yao

  • keywords HasPatch removed
  • owner set to garry.yao
  • version set to SVN (CKEditor)
  • status changed from new to assigned
  • 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.

Changed 4 months ago by fredck

  • keywords Review+ added; Review? removed

Changed 4 months 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.