Bug Tracker

Modify

Ticket #12218 (closed bug: worksforme)

Opened 10 months ago

Last modified 10 months ago

IE9 "access refused" error when using a selector to build a fragment

Reported by: softlion@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8rc1
Keywords: Cc:
Blocking: Blocked by:

Description

$('<a href="#"></a>') fails on IE9 with "access refused" error. The problem happens in buildFragment when accessing context.ownerDocument property.

Quick Fix:

jQuery.buildFragment = function( args, context, scripts ) {

var fragment, cacheable, cachehit,

first = args[ 0 ];

Set context from what may come in as undefined or a jQuery collection or a node

context = context
document;

try {

context = (context[0]
context).ownerDocument context[0] context;

} catch(e) {

context = context[0]
context;

}

Change History

comment:1 Changed 10 months ago by dmethvin

  • Status changed from new to closed
  • Resolution set to worksforme

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.