Skip to main content

Bug Tracker

Side navigation

#3898 closed bug (duplicate)

Opened January 17, 2009 01:31AM UTC

Closed January 17, 2009 09:57PM UTC

Last modified January 07, 2010 07:26AM UTC

jQuery 1.3 cross-domain iframe bug

Reported by: shadedecho Owned by: john
Priority: undecided Milestone: 1.3.1
Component: unfiled Version: 1.3
Keywords: iframe crossdomain Cc:
Blocked by: Blocking:

I've run into a major problem with jQuery 1.3, but it is only happening with IE7 (not FF3). I have CompanionJS/DebugBar installed on IE, and it catches the errors. I've attached a screenshot showing the errors.

When I load the core library into an iframe with a different URL than the parent page, I get "Access is denied" and other javascript errors. Apparently, the jQuery object fails to get defined as part of the "Access..." error and then other errors cascade from that.

I've got a simple test which basically does nothing but load up the jQuery library into such an iframe. The exact same page can be accessed via two different domains, but the iframe is hardcoded to one of the two domains. So, when the parent page domain is the same as the iframe, jQuery loads fine. But when you create a cross-domain situation, errors ensue (no code changes, just different page domain). (works, because the domains match) (fails with errors)

Attachments (1)
Change History (4)

Changed January 17, 2009 04:12AM UTC by dmethvin comment:1

Your test page also fails in the same location on IE8 beta 2. Could you use the uncompressed jQuery 1.3 on those pages to see if that changes anything? At the very least it would make it easier to use the IE8 debugger. :-)

Changed January 17, 2009 04:26AM UTC by dmethvin comment:2

owner: → john

It appears that #3880 is reporting a potential fix for this test case.

Changed January 17, 2009 09:57PM UTC by john comment:3

resolution: → duplicate
status: newclosed

Yeah, this looks like a duplicate of #3880. I'll apply the fix over there and hope it fixes the problem.

Changed January 19, 2009 07:40AM UTC by shadedecho comment:4

I patched my copy of jQuery 1.3 (both the compressed and src versions) with the SVN6120 patch, and re-tested, and indeed the issue is resolved. Thanks for the quick fix!

Can/will this bug make it into the release notes or some other documented place so others that I have who I recommend for jQuery upgrade will know about this problem?