Bug Tracker

Ticket #13232 (closed bug: fixed)

Opened 19 months ago

Last modified 19 months ago

In 2.0beta1, using html() function on a tbody selector yields insertion of new tbody

Reported by: bhs.jquery@… Owned by: markelog
Priority: undecided Milestone: 2.0
Component: manipulation Version: 2.0b1
Keywords: Cc:
Blocking: Blocked by:

Description

When a tbody is selected and then new DOM elements (rows, data cells) are inserted via a call to html(), jQuery 2.0beta1 appears to insert a new tbody. Perhaps when the rows are created, before the resulting structure is added to the document, a containing tbody is created?

The effect can be witnessed here:  http://jsfiddle.net/VDTjz/1/

The second row should not be red. Switching back to jQuery 1.9 yields the expected result, a blue second row.

Change History

comment:1 Changed 19 months ago by markelog

  • Owner set to markelog
  • Status changed from new to assigned
  • Component changed from unfiled to manipulation
  • Milestone changed from None to 2.0

Thank you for checking it out. PR request –  https://github.com/jquery/jquery/pull/1138

comment:2 Changed 19 months ago by dmethvin

#13256 is a duplicate of this ticket.

comment:3 Changed 19 months ago by Oleg

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

Fix #13232, fix jQuery.buildFragment for tables, close gh-1138.

Changeset: 19def21df41d6be6419e4d2480a656d9e1a0e6b7

comment:4 Changed 19 months ago by rwaldron

#13287 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.