Bug Tracker

Opened 13 years ago

Closed 12 years ago

#5969 closed bug (wontfix)

'Access Denied' on 2nd time for wrap().

Reported by: PedroLuz Owned by:
Priority: major Milestone: 1.4.1
Component: core Version: 1.4.1
Keywords: wrap access denied frames patchwelcome Cc:
Blocked by: Blocking:

Description (last modified by dmethvin)

I've a page with 3 frames (nav, main and dummy). Where frame main contains the page itself.

This page executes this script on load:

$(frames["main"].document).ready(function() {
   $("frame[name=main]").bind("load", function() { 

The erroneous line inside NormalizarSiga() is:

$(":button, :reset, :submit", frameMain.document).wrap("<span class='btnSiga'><span></span></span>");

'frameMain' variable is the same as 'framesmain?'

The problem is: The error (Access Denied) is only raised at the 2nd time this line is executed. At the 1st time everything goes just fine and the results are O.K

Error is raised at line 117 of jQuery-1.4.1.js (development)

Change History (3)

comment:1 Changed 13 years ago by PedroLuz

I've managed to fix it, but it's just a shoot in the dark:

On function buildFragment(), I've made the following change:

cacheresults = jQuery.fragments[ args[0] ]; is now cacheresults = undefined

Doing that, I get no more Access Denied errors.

comment:2 Changed 13 years ago by dmethvin

Description: modified (diff)
Priority: blockermajor

You didn't say this was IE but from the description I am pretty sure that it is.

I think this is another case of #4280. Whenever you change the contents of a document in another iframe, IE invalidates the DOM object references that you may be holding. jQuery can't really work around this so you will need to change your code to avoid the problem.

comment:3 Changed 12 years ago by addyosmani

Keywords: patchwelcome added
Resolution: wontfix
Status: newclosed

As this is not something jQuery can currently work around in IE and there are no known patch for it, we're going to have to close this. If however you or another community member come up with a patch for this issue and would like to submit it we would be more than happy to review. Thanks.

Note: See TracTickets for help on using tickets.