Opened 12 years ago

Last modified 10 years ago

#8482 confirmed Bug

DispHTMLUnknownElement with invalid code

Reported by: matteo.ugolini Owned by:
Priority: Normal Milestone:
Component: General Version: 3.1
Keywords: IE Cc:


By selecting a dom range who contains invalid Html tags, IE causes an error in the error function at the line 201 of the element.js:

this.$.appendChild( node.$ );

In the case value contains an invalid tag, fe.: <foo>some content</foo>, the "this.$" is an instance of DispHTMLUnknownElement who doesn't implements the appendChild function.

the error is caused by the, this.createBookmark(); line 1636 plugins/selection/plugin.js, clone.insertNode( startNode ); line 528 /core/dom/range.js

We are currently experiencing this issue with IE 8 and 9, we haven't tried with prior version of the software.

Attachments (2) (588 bytes) - added by Jakub Ś 12 years ago. (592 bytes) - added by Jakub Ś 10 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 12 years ago by Jakub Ś

Status: newpending

Could I ask you to provide a JavaScript code you are using reproduce the issue?

Or perhaps better - a reproducible reduced test case?

comment:2 Changed 12 years ago by Jakub Ś

@matteo.ugolini any chance for a reduced test case showing the problem?

comment:3 Changed 12 years ago by OlaA

[edit: Never mind, I forgot to include the custom namespace, and found a DispHTMLUnknownElement when debugging, thinking this bug was related]

I'm experiencing the same problem, with a plugin that styles selected text with a custom tag. The custom tag contains a ':' character, the problem does not occur if the ':' is removed.

This is on CKEditor 3.6 (revision 6902).

Here's a simplified version of the plugin code I'm using:

  requires: ['styles', 'button'],
  init: function(editor)
    var style = new{element: 'custom:tag'});
    editor.attachStyleStateChange(style, function(state)
        !editor.readOnly && editor.getCommand('switchCustomTag').setState(state);
    editor.addCommand('switchCustomTag', new CKEDITOR.styleCommand(style));
        label: 'Switch custom tag', 
        command: 'switchCustomTag'
Last edited 12 years ago by OlaA (previous) (diff)

comment:4 Changed 12 years ago by Jakub Ś

Keywords: IE added
Status: pendingconfirmed
Version: 3.6.3 (SVN - trunk)3.1

Issue Has been reproducible in IE6-8, other browsers work fine. I have managed to reproduce it from CKEditor 3.1

To test it copy attached folder into /_source/samples/ folder and add the below code to CKEditor configuration

extraPlugins : 'customtag', 
toolbar : [['switchCustomTagButton']]

JS error that occurs:
Message: Unexpected call to method or property access
Line: 201
URI: /3.6.2/ckeditor/_source/core/dom/element.js

Changed 12 years ago by Jakub Ś

Attachment: added

Changed 10 years ago by Jakub Ś

Attachment: added

comment:5 Changed 10 years ago by Jakub Ś

It seems this is still an issue in latest CKEditor 4.2 in IE8.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy