Bug Tracker

Opened 13 years ago

Closed 13 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 13 years ago by Royce

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.

comment:2 Changed 13 years ago by john

Milestone: 1.1.31.2.2
Resolution: worksforme
Status: newclosed
Version: 1.1.21.2.1

This should be resolved.

Note: See TracTickets for help on using tickets.