Opened 12 years ago
Last modified 8 years ago
#9780 closed Bug
Calling setReadOnly(true) in IE 8 and 9 then clicking in the entry area causes Javascript Error — at Version 8
Reported by: | Alex Florin | Owned by: | |
---|---|---|---|
Priority: | Nice to have (we want to work on it) | Milestone: | |
Component: | Core : Read-only | Version: | 4.0 |
Keywords: | Cc: |
Description (last modified by )
Calling setReadOnly(true) in IE 8 and 9 then clicking in the entry area of the editor causes the Javascript Error listed below.
I have tried it on the latest version of Chrome, Firefox and Safari and none exhibit the problem. I have NOT tried it in other versions of IE.
Message: Unable to get value of the property 'ownerDocument': object is null or undefined Line: 303 Char: 472 Code: 0 URI: http://wolf/Pathway/ckeditor/ckeditor.js?0111891205
Message: Unable to get value of the property 'ownerDocument': object is null or undefined Line: 303 Char: 472 Code: 0 URI: http://wolf/Pathway/ckeditor/ckeditor.js?0111891205
Simplified TC:
- Set editor to readOnly:true
- Load editor with empty content area
- Click inside editor
JS error:
Message: SCRIPT5007: Unable to get value of the property 'ownerDocument': object is null or undefined.
Line: 370
URI: /ckeditor/core/selection.js
Problem can be reproduced from CKEditor 3.6.3 rev. [7374] in IE8-10.
Change History (9)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Status: | new → pending |
---|
I was not able to reproduce this neither in my local build nor in demo page.
- Are you able to reproduce this issue only in your app or perhaps on demo page or clean editor without any customizations?
- Another option is that you IE settings are causing this thus it would be nice if you could provide exact steps to reproduce this.
comment:3 Changed 12 years ago by
Hey,
I forgot to mention its running under asp.net. However I took that out of the equation and I'm still seeing it. Right in the ckeditor folder, I created HTMLPage1.htm and HTMLPage1.js.
Heres the HTMLPage1.htm:
<!DOCTYPE html PUBLIC "-W3CDTD HTML 4.01EN" "http://www.w3.org/TR/html4/strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
<title></title> <script language="JavaScript" src="ckeditor.js" type="text/javascript"></script> <script language="JavaScript" src="HTMLPage1.js" type="text/javascript"></script>
</head>
<body onload="handleOnLoad();">
<textarea id="TextBox1" cols="20" rows="2"></textarea>
</body>
</html>
Here is HTMLPage1.js:
function handleOnLoad() {
CKEDITOR.replace('TextBox1', {
on: {
'instanceReady': function (ev) {
ev.editor.setReadOnly(true);
}
}
});
}
When I click on the htm page, the page loads in IE with ckeditor disabled. If I click in the entry area, I get the error in line c.parentElement().ownerDocument of the following code:
CKEDITOR.on("instanceCreated", function (a) {
... ... ...
if (CKEDITOR.env.version > 7) {
n.on("mousedown", function (a) {
if (a.data.getTarget().is("html")) {
e.on("mouseup", r); n.on("mouseup", r)
}
});
var r = function () {
e.removeListener("mouseup", r); n.removeListener("mouseup", r); var b = CKEDITOR.document.$.selection,
c = b.createRange();
b.type != "None" && c.parentElement().ownerDocument == a.$ && c.select()
}
}
It's possible its some IE setting in my box. I'll try it on another developer's machine when I get into work on monday.
comment:4 Changed 12 years ago by
I just noticed that if I set readOnly:true in the replace call, there is no error. So it only occurs when calling the setReadOnly(true) function AFTER the ckeditor is loaded.
comment:5 Changed 12 years ago by
I have tried it on another developer's machine running IE 10 (beta) on windows 7 and it has the same issue. My PC is running windows 7 IE 9.0.8112.164421 with update version 9.0.11
comment:6 Changed 12 years ago by
@aflorin, thank you for the information and don't worry I will check this once more. I Just need some time.
Changed 12 years ago by
Attachment: | Desktop.zip added |
---|
comment:7 Changed 12 years ago by
comment:8 Changed 12 years ago by
Description: | modified (diff) |
---|---|
Status: | pending → confirmed |
#10309 was marked as duplicate
Oops. Sorry about including the link to my local ckeditor.js.