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:

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.



<html xmlns="" >





<iframe name="IFrame" src="jQuery.aspx"></iframe>






<html xmlns="" >

<head runat="server">


<script src="jquery.js"></script>



<form id="form1" runat="server">

<a href="">Test</a>




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

resolution: → worksforme
status: newclosed

This should be resolved.