Bug Tracker

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#8950 closed bug (fixed)

(Chrome, Firefox) Second argument (event empty) in jQuery throws error while creating <input>

Reported by: shocksilien@… Owned by: rwaldron
Priority: blocker Milestone: 1.6.2
Component: manipulation Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:


Link to test: http://theshock.github.com/trash/jquery-input-bug/index.html

// Error:
Uncaught TypeError: Object #<Object> has no method 'createDocumentFragment'

// Here:
    if ( !fragment ) {
        fragment = doc.createDocumentFragment(); // <====
        jQuery.clean( args, doc, fragment, scripts );

Test code:

$(function() {
	// success:
	$('<div />', {});
	$('<input>', { 'class': 'test' });
	$('<input type="hidden" />').attr({ 'class': '123' });

	// fail:
	$('<input type="hidden" />', { 'class': 'test' });
	$('<input type="hidden" />', {});

Change History (7)

comment:1 Changed 5 years ago by anonymous

Test case at jsFiddle: http://jsfiddle.net/YYqgM/

comment:2 Changed 5 years ago by rwaldron

  • Component changed from unfiled to manipulation
  • Owner set to rwaldron
  • Priority changed from undecided to blocker
  • Status changed from new to assigned

comment:4 Changed 5 years ago by timmywil

  • Milestone changed from 1.next to 1.6.2

comment:5 Changed 5 years ago by rwaldron

The correct pull request is here: https://github.com/jquery/jquery/pull/365

comment:6 Changed 5 years ago by Rick Waldron

  • Resolution set to fixed
  • Status changed from assigned to closed

Landing pull request 365. jQuery.buildFragment, ensure doc is a document; Fixes #8950.

More Details:

comment:7 Changed 5 years ago by rwaldron

#9498 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.