Skip to main content

Bug Tracker

Side navigation

#1314 closed bug (worksforme)

Opened June 21, 2007 08:08PM UTC

Closed December 12, 2007 07:19PM UTC

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>

Attachments (0)
Change History (2)

Changed June 22, 2007 02:28PM UTC by Royce comment:1

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.

Changed December 12, 2007 07:19PM UTC by john comment:2

milestone: 1.1.31.2.2
resolution: → worksforme
status: newclosed
version: 1.1.21.2.1

This should be resolved.