Opened 16 years ago
Closed 16 years ago
#1314 closed bug (worksforme)
jQuery fails when document in IFrame is changed.
Reported by: | Royce | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.2.2 |
Component: | event | Version: | 1.2.1 |
Keywords: | IFrame | Cc: | |
Blocked by: | Blocking: |
Description
jQuery fails when running in an IE7 IFrame and the document is changed, ex: navigating to a pdf file.
Fails on line 1322 in the "fix:" method, var e = document.documentElement, b = document.body;
At this point the document is "undefined" and fails.
Example:
/
<html xmlns="http://www.w3.org/1999/xhtml" > <head>
<title></title>
</head> <body> <iframe name="IFrame" src="jQuery.aspx"></iframe> </body> </html>
/ jQuery.aspx
<html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server">
<title></title> <script src="jquery.js"></script>
</head> <body>
<form id="form1" runat="server">
<a href="http://illiad.evms.edu/sample.pdf">Test</a>
</form>
</body> </html>
Change History (2)
comment:1 Changed 16 years ago by
comment:2 Changed 16 years ago by
Milestone: | 1.1.3 → 1.2.2 |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
Version: | 1.1.2 → 1.2.1 |
This should be resolved.
I have traced it back to the onunload being attatched to the window. The problem seems to be the way IE bubbles up events. The event is comming from the window so at this point the document = undefined. If you attatch the events to the document object the code will run, so the event will bubble from the document and then up to the window before IE destroys the document object.