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
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780>
CKEditor <http://ckeditor.com/>
The text editor for the Internet
Comment (by aflorin):
Oops. Sorry about including the link to my local ckeditor.js.
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780#comment:1>
* status: new => pending
Comment:
I was not able to reproduce this neither in my local build nor in demo
page.
1. Are you able to reproduce this issue only in your app or perhaps on
demo page or clean editor without any customizations?
2. Another option is that you IE settings are causing this thus it would
be nice if you could provide exact steps to reproduce this.
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780#comment:2>
Comment (by aflorin):
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 "-//W3C//DTD HTML 4.01//EN"
"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.
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780#comment:3>
Comment (by aflorin):
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.
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780#comment:4>
Comment (by aflorin):
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
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780#comment:5>
Comment (by j.swiderski):
@aflorin, thank you for the information and don't worry I will check this
once more. I Just need some time.
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780#comment:6>
Comment (by j.swiderski):
Problem can be reproduced from CKEditor 3.6.3 rev. [7374] in IE8-10.
To reproduce just copy attached files into editor samples folder, load
page in browser and click in content area.
Other tickets caused by this revision are #8919 and #9329.
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780#comment:7>
* status: pending => confirmed
Old description:
> 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
New description:
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:
1. Set editor to readOnly:true
2. Load editor with empty content area
3. Click inside editor
**JS error:**[[BR]]
Message: SCRIPT5007: Unable to get value of the property 'ownerDocument':
object is null or undefined. [[BR]]
Line: 370 [[BR]]
URI: /ckeditor/core/selection.js
Problem can be reproduced from CKEditor 3.6.3 rev. [7374] in IE8-10.
--
Comment:
#10309 was marked as duplicate
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780#comment:8>
Comment (by req):
Reproducible in IE10. This is closely linked to selections, you can
reproduce the error in JS console with
{{{
CKEDITOR.document.$.selection.parentElement().ownerDocument
// CKEDITOR.document.$.selection is [object MSSelection]
}}}
You can do this at any point to get the same error, not only when the
editor is disabled. It seems that this code is just only called when the
editor is disabled and a user clicks on the area, so that's why the bug
appears in that situation.
Also for further information; this seems to happen in the mouseup event.
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780#comment:9>
Comment (by maufarinelli):
Do you guys have some fix for this?
I get the same problem.
I load a page with some CKEDITOR's instances, but sometimes I need to set
readOnly in one of the instances.
Then, I get:
{{{
SCRIPT5007: Impossible d’obtenir la propriété « innerHTML » d’une
référence null ou non définie
ckeditor.js, Ligne 17 Caractère 45
}}}
and If I click on it, I get:
{{{
SCRIPT5007: Impossible d’obtenir la propriété « ownerDocument » d’une
référence null ou non définie
ckeditor.js, Ligne 131 Caractère 1519
}}}
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780#comment:10>
Comment (by zevane):
I've made a workaround for this issue. I post it here, should it help you:
At core/selection.js, line 756
Instead of:
{{{
if ( sel.type != 'None' && range.parentElement().ownerDocument == doc.$ )
}}}
Use this:
{{{
if ( sel.type != 'None' && (range.parentElement() || {}).ownerDocument ==
doc.$ )
}}}
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780#comment:11>
Comment (by paulvrugt):
Any news on this? This bug is now FOUR year old, and the last activity is
20 months ago. The fix seems fairly easy so is it possible to include this
fix in a release?
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780#comment:12>
* priority: Normal => Nice to have (we want to work on it)
Comment:
Let's check this one, as it's easy to reproduce.
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780#comment:13>
Comment (by j.swiderski):
It is possible #16820 is related and perhaps both could be solved with the
same fix.
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780#comment:14>
* owner: => msamsel
* status: confirmed => assigned
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780#comment:15>
Comment (by msamsel):
PR:
https://github.com/ckeditor/ckeditor-dev/pull/375
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780#comment:16>
* status: assigned => review
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780#comment:17>
* status: review => closed
* resolution: => fixed
Comment:
Fixed with [https://github.com/ckeditor/ckeditor-
dev/commit/84f72ad0a831b78c9cdd3a54f9fb45e6196460ef 84f72ad].
--
Ticket URL: <http://dev.ckeditor.com/ticket/9780#comment:18>