Side navigation
#5969 closed bug (wontfix)
Opened January 28, 2010 06:34PM UTC
Closed November 10, 2010 09:21PM UTC
'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
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() { NormalizarSiga(frames["main"]); }) });
The erroneous line inside NormalizarSiga() is:
$(":button, :reset, :submit", frameMain.document).wrap("<span class='btnSiga'><span></span></span>");
'frameMain' variable is the same as 'frames["main"]'
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)
Attachments (0)
Change History (3)
Changed January 28, 2010 07:19PM UTC by comment:1
Changed January 29, 2010 02:58AM UTC by comment:2
description: | 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() { NormalizarSiga(frames["main"]); }) }); \ \ The erroneous line inside NormalizarSiga() is: \ \ $(":button, :reset, :submit", frameMain.document).wrap("<span class='btnSiga'><span></span></span>"); \ \ 'frameMain' variable is the same as 'frames["main"]' \ \ 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) \ \ \ \ → 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() { \ NormalizarSiga(frames["main"]); \ }) \ }); \ }}} \ The erroneous line inside NormalizarSiga() is: \ \ $(":button, :reset, :submit", frameMain.document).wrap("<span class='btnSiga'><span></span></span>"); \ \ 'frameMain' variable is the same as 'frames["main"]' \ \ 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) \ \ \ \ |
---|---|
priority: | blocker → major |
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.
Changed November 10, 2010 09:21PM UTC by comment:3
keywords: | wrap access denied frames → wrap access denied frames patchwelcome |
---|---|
resolution: | → wontfix |
status: | new → closed |
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.
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.