#11925 closed Bug (wontfix)
Calling getUniqueId on a container fails in IE8
Reported by: | Chema | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
Calling getUniqueId method on elements seems to be failing in IE8
Steps to reproduce:
- Navigate to http://www.ckeditor.com/demo in IE8
- Open dev tools
- Type the following sequence:
editor = CKEDITOR.instances.editor1 container = editor.getSelection().getRanges()[0].startContainer container.getUniqueId()
Result: An Object doesn't support this property or method error is thrown.
Expected: No error to be thrown and the element unique id to be returned
Change History (6)
comment:1 Changed 11 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 11 years ago by
Glad you like it! :D
Additionally:
> container.getUniqueId.apply(container) "Object doesn't support this property or method" > container.getUniqueId.apply(window) 65
comment:3 Changed 11 years ago by
most likely it's due to calling text node, it works with elements, see:
var p = CKEDITOR.instances.editor1.editable().getFirst(); // works p.getUniqueId(); var txt = p.getFirst().getNext(); // Does not work // throws: "Object doesn't support this property or method" txt.getUniqueId(); // note: // throws exception: "'this.$.data-cke-expando' is null or not an object" txt.getUniqueId.call()
comment:4 Changed 11 years ago by
This method is defined in CKEDITOR.dom.domObject, so it should work on all elements. Although, I remember that on some older IEs the expando didn't work, because it couldn't be set on text nodes. Maybe we were confused by the error message which looks like a method does not exist. Maybe IE throws this when setting textNode.data-cke-expando as Marek said. We'll check this, but if it's right, then it's a "won't fix" of course.
comment:5 Changed 11 years ago by
Resolution: | → wontfix |
---|---|
Status: | confirmed → closed |
>>document.createTextNode('foo')['data-cke-expando'] = 1'; "Object doesn't support this property or method"
Yup. So getUniqueId can't work on text nodes in IE8. Added note about this in docs: git:81dc62302.
comment:6 Changed 11 years ago by
Thanks for looking into it...
Sad we can't fix this somehow, since it renders that API basically unusable if you need to support IE8 :(
Glad at least we've got it documented now.
Wow... This is very, very odd:
Looks like an ugly IE8 bug. That will be an awesome fun debugging this :D.