#16248 closed defect (fixed)
[patch][cla][pr] IE9 display a error "Object doesn't support this action" at the following location doc.readyState = "complete" in 1.8 dojo.js
Reported by: | midway500 | Owned by: | Rawld Gill |
---|---|---|---|
Priority: | high | Milestone: | 1.8.11 |
Component: | Core | Version: | 1.8.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
windowOnLoadListener = domOn(window, "load", "onload", function(){ req.pageLoaded = 1; doc.readyState!="complete" && (doc.readyState = "complete"); windowOnLoadListener(); });
Attachments (2)
Change History (23)
comment:1 Changed 8 years ago by
Owner: | set to midway500 |
---|---|
Status: | new → pending |
comment:2 Changed 8 years ago by
Status: | pending → new |
---|
I have not have a chance to crate a test case yet but a quick search of dojo.js indicates that doc is alias for window.document and doc.readyState is a read-only attribute and IE 9 does not like modification to the read-only attribute.
Further inspect at the statement seems to me that it does not do anything useful as it tries to set a read-only attribute. Might be that statement is not necessary at all. I might be wrong as I don't know the whole context of the function. I will create a test case as soon as I have a chance. Thx.
comment:3 Changed 8 years ago by
Description: | modified (diff) |
---|---|
Owner: | changed from midway500 to Rawld Gill |
Status: | new → assigned |
Summary: | IE 9 display a error "Object doesn't support this action" at the following location doc.readyState = "complete" in 1.8 dojo.js → IE9 display a error "Object doesn't support this action" at the following location doc.readyState = "complete" in 1.8 dojo.js |
Yes, setting doc.readyState does look suspicious. It's from Rawld in [25545].
comment:4 Changed 8 years ago by
Milestone: | tbd → 1.9 |
---|
comment:5 Changed 8 years ago by
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
This code is fragile with all the browsers we're trying to support. Feel free to reopen if you can provide a small test to show the problem.
comment:6 Changed 8 years ago by
Actually, I don't get why you need test case, it's pretty easy to check if this property readonly in IE < 9, and it's obvious that code will always fail if it reach branch when readyState != "complete". Fine, if you need test files - it's attached. Open main file and wait one sec while inline frame reload itself. Also someone, please re-open ticket, looks like I have no right to do it.
comment:7 Changed 8 years ago by
Milestone: | 1.9 → tbd |
---|---|
Resolution: | invalid |
Status: | closed → reopened |
comment:8 Changed 7 years ago by
The problem occurs with dojo 1.9.2. It is sporadic and difficult to reproduce. To bypass the problem, I changed in my environment the function in file dojo.js to catch the exception:
windowOnLoadListener = domOn(window, "load", "onload", function(){
req.pageLoaded = 1; try{doc.readyState != "complete" && (doc.readyState = "complete");}catch(ex){}; windowOnLoadListener();
});
comment:9 Changed 6 years ago by
Any update on this bug?? It's 3 years old and the last comment was 15 months ago. Our product needs this fix.
comment:10 Changed 6 years ago by
Milestone: | tbd → 1.11 |
---|---|
Priority: | undecided → blocker |
comment:11 Changed 5 years ago by
Owner: | changed from Rawld Gill to dylan |
---|---|
Status: | reopened → assigned |
comment:12 Changed 5 years ago by
Priority: | blocker → high |
---|
comment:13 Changed 5 years ago by
Summary: | IE9 display a error "Object doesn't support this action" at the following location doc.readyState = "complete" in 1.8 dojo.js → [patch] IE9 display a error "Object doesn't support this action" at the following location doc.readyState = "complete" in 1.8 dojo.js |
---|
comment:14 Changed 5 years ago by
Owner: | changed from dylan to Rawld Gill |
---|
PR needs review at https://github.com/dojo/dojo/pull/199 .
comment:15 Changed 5 years ago by
Summary: | [patch] IE9 display a error "Object doesn't support this action" at the following location doc.readyState = "complete" in 1.8 dojo.js → [patch][cla][pr] IE9 display a error "Object doesn't support this action" at the following location doc.readyState = "complete" in 1.8 dojo.js |
---|
comment:16 Changed 5 years ago by
doc.readyState = "complete" is executed iff doc.readyState != "complete", which will be true for browsers with bugs setting doc.readyState. Historically, the only browser with this problem is FF<=3.5...which is long gone.
I was unable to dup the bug on browserstack with the provided examples on IE 7,8 on XP and 8-10 on Win7. I would be very interested to know the value of doc.readyState when this bug shows on IE.
The proposed patch (https://github.com/dojo/dojo/pull/199) looks fine, though it will not fix the apparently broken browser thereby possibly causing dojo/domReady to fail, it will certainly squelch bug without doing further harm.
comment:21 Changed 5 years ago by
Milestone: | 1.11 → 1.8.11 |
---|
Please attach a test case using the "attach file" button. It should be as small as possible to still reproduce the problem, almost always a single HTML file that we can load in the browser and use to reproduce then problem.
Then, give exact instructions on how to reproduce the problem using your attached test file.
The test case is necessary both to confirm that there's a bug, and for us to be able to debug the problem.
Thanks!