Opened 13 years ago
Last modified 11 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: |
Description
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 range.select(true), 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)
Change History (7)
comment:1 Changed 13 years ago by
Status: | new → pending |
---|
comment:2 Changed 13 years ago by
@matteo.ugolini any chance for a reduced test case showing the problem?
comment:3 Changed 13 years ago by
[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:
CKEDITOR.plugins.add('customtag', { requires: ['styles', 'button'], init: function(editor) { var style = new CKEDITOR.style({element: 'custom:tag'}); editor.attachStyleStateChange(style, function(state) { !editor.readOnly && editor.getCommand('switchCustomTag').setState(state); }); editor.addCommand('switchCustomTag', new CKEDITOR.styleCommand(style)); editor.ui.addButton('switchCustomTagButton', { label: 'Switch custom tag', command: 'switchCustomTag' }); }, });
comment:4 Changed 13 years ago by
Keywords: | IE added |
---|---|
Status: | pending → confirmed |
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 13 years ago by
Attachment: | customtag.zip added |
---|
Changed 11 years ago by
Attachment: | customtag_v4.zip added |
---|
Could I ask you to provide a JavaScript code you are using reproduce the issue?
Or perhaps better - a reproducible reduced test case?