Opened 13 years ago
Last modified 13 years ago
#8570 confirmed Bug
setReadOnly in combination with getSnapshot throws an error in IE
Reported by: | Matt | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.6.1 |
Keywords: | Cc: |
Description
If you call setReadOnly and getSnapshot synchronously, an Error is thrown in IE (7-9, not tested in 10PP)
Reproduce:
- Go to http://ckeditor.com/demo
- Open the IE development tools
- Into the console, type in one line CKEDITOR.instances.editor1.setReadOnly(true); CKEDITOR.instances.editor1.getSnapshot();
- Hit enter
- An error occurs.
Working variation:
- Reload page
- Type into the console CKEDITOR.instances.editor1.setReadOnly(true);
- Hit enter
- Type CKEDITOR.instances.editor1.getSnapshot();
- Hit enter
- No error occurs
A workaround is to set readOnly first and do the rest of the work in a timeout.
Attachments (1)
Change History (3)
comment:1 Changed 13 years ago by
Status: | new → confirmed |
---|---|
Version: | 3.6.2 → 3.6.1 |
Changed 13 years ago by
comment:2 Changed 13 years ago by
I'm not sure if it the same problem, but in Firefox something similar happens. Instead of throwing an error, getSnapshot returns an empty string.
Same setting as in the description above, using Firefox 7.0.1
If I use CKEDITOR.instances.editor1.document.getBody().$.innerHTML, I get the correct data.
Reproducible in all versions of IE form CKEditor 3.6.1 rev [6965]
To reproduce just copy the attached file into samples folder and load it in IE.
JS error:
Message: 'this.$.innerHTML' is nul lor not an object
Line: 348
URI: /3.6.2/ckeditor/_source/core/dom/element.js