Skip to main content

Bug Tracker

Side navigation

#14535 closed bug (fixed)

Opened November 13, 2013 05:50PM UTC

Closed November 14, 2013 07:36PM UTC

Last modified May 19, 2014 10:23PM UTC

Selection fails in IE11 when the last context is a no-longer-present iframe document

Reported by: gibson042 Owned by: gibson042
Priority: high Milestone: 1.11/2.1
Component: selector Version: 2.0.3
Keywords: Cc:
Blocked by: Blocking:

Per #14386 comment 7 and, IE11 throws the same "SCRIPT70: Permission denied" exception from #13936, but the Sizzle fix working around it fails because IE11 lacks attachEvent.

Attachments (0)
Change History (17)

Changed November 13, 2013 06:11PM UTC by anonymous comment:1

One workaround, for now, is to redraw the iframe element, rather than reload it

Hack, I know, but may help someone

Changed November 13, 2013 06:40PM UTC by gibson042 comment:2

component: unfiledselector
owner: → gibson042
priority: undecidedhigh
status: newassigned

Changed November 14, 2013 07:36PM UTC by Timmy Willison comment:3

resolution: → fixed
status: assignedclosed

Fixes #14535: update Sizzle to 1.10.13

Changeset: c389c2e6ba698e95c683ad113d728e757a4da29a

Changed November 15, 2013 03:17AM UTC by anonymous comment:4

Not familiar with the bug system here. When will this be included as part of jQuery?

Changed November 15, 2013 03:18AM UTC by anonymous comment:5

Not familiar with the bug system here. When will this be included as part of jQuery?

Changed November 15, 2013 03:35AM UTC by gibson042 comment:6

Replying to [comment:4 anonymous]:

Not familiar with the bug system here. When will this be included as part of jQuery?

The next release (1.11 & 2.1).

Changed November 15, 2013 02:00PM UTC by dmethvin comment:7

milestone: None1.11/2.1

Changed November 15, 2013 05:56PM UTC by anonymous comment:8

Any estimate on when 1.11 will be rolling out?

Changed November 15, 2013 05:57PM UTC by dmethvin comment:9 will let you know. There's a beta coming out today.

Changed November 15, 2013 07:12PM UTC by anonymous comment:10

Great thanks!

Changed November 23, 2013 01:04AM UTC by muley comment:11

I also get permission denied in jQuery/Sizzle when using IE and iframes. I manipulate the source of the iframe from the parent document (yes, all documents are on the same domain), and I see these errors sporadically when the iframe has unloaded and reloaded with new content. I have not been able to produce a consistent test case. So I'm not entirely sure this is the same issue, but I've tracked it down to jQuery 1.10.2, line #1188:

if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {

I sometimes get "Permission Denied" when the line above tries to access "document". I've found a workaround by manually resetting the document object to be "window.document" before this line. It makes no sense to me. See fiddle for the edited source block:

Changed November 23, 2013 01:32AM UTC by dmethvin comment:12

@muley, are you saying you are *still* seeing these problems with the version? Or are you just saying you didn't understand the conversation above saying it was fixed and would be in the 1.11 release?

Changed November 23, 2013 05:43AM UTC by muley comment:13

I was previously testing with jQuery 1.9.1 and 1.10.2 (mostly 1.10.2). I did just now test with the jQuery-git.js version you referenced. And, though it seems better (i.e. harder to break), I still eventually get permission denied errors after unloading/loading multiple pages in the iframe. This only breaks in IE:

The errors seem to be thrown in the main/parent window though. I use .on() in the parent and those are the events that end up throwing the exceptions. The workaround I provided earlier still seems to resolve the issue. I'll attempt to put together a simplified testcase in the next few days. My issue could be completely unrelated to this case above.

Changed November 23, 2013 02:34PM UTC by dmethvin comment:14

Please put together a test case, preferably using or, and create a new ticket.

Changed December 13, 2013 01:41PM UTC by anonymous comment:15

I have tested my project with jquery-1.11.0-beta2.js and it still produces the "SCRIPT70: Permission denied" error in IE10. The onbeforeunload event handler on the iframe should remove the obsolete document object from the context.

But the onbeforeunload does not get fired when window.location.href is used to navigate inside the Iframe when I set it in the onload event fo the iframe.

When I add

	if ( parent && parent.attachEvent && parent !== ) {
		parent.attachEvent( "onunload", function() {

it works

Changed May 19, 2014 10:01PM UTC by Frank comment:16

When I access the content and/or update the source of an iframe IE9/10/11 returns the error: SCRIPT70: Access is denied; only applying the fix reported in comment11 posted by "Muley" (fix-> the fault no longer occurs.

Changed May 19, 2014 10:23PM UTC by Frank comment:17

This anomaly is also found on new version of jquery 1.11.1.