Ticket #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
Change History
comment:2 Changed 4 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.
Note: See
TracTickets for help on using
tickets.
