Skip to main content

Bug Tracker

Side navigation

#7795 closed bug (worksforme)

Opened December 16, 2010 07:55PM UTC

Closed July 12, 2011 04:07PM UTC

.append method fails in all version 1.4.x

Reported by: sandro@idweb.it Owned by:
Priority: high Milestone: 1.next
Component: manipulation Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:
Description

if you use the .append method with a radio input string value with the name attribute and the checked attribute more than 2 times the checked attribute was ignored.

Example:

var str1 = "<input id=\\"xxx\\" type=\\"radio\\" codice=\\"xxx\\" name=\\"xxx\\" value=\\"1\\" checked />";

$("#xxx").html("");

$("#xxx").append(str1);

if you call this in a onclick event more than 2 times the radio appended will be not checked.

Thanks

Attachments (0)
Change History (5)

Changed December 16, 2010 07:57PM UTC by sandro@idweb.it comment:1

Sorry a type mistake:

Example: var str1 = "<input id=\\"xxx\\" type=\\"radio\\" codice=\\"xxx\\" name=\\"xxx\\" value=\\"1\\" checked />"; $("#aaa").html(""); $("#aaa").append(str1);

where aaa was a div id.

Sorry

Changed December 16, 2010 10:45PM UTC by snover comment:2

owner: → sandro@idweb.it
status: newpending

Please provide a reduced, working test case on jsFiddle.

Changed December 16, 2010 10:51PM UTC by jitter comment:3

owner: sandro@idweb.it
status: pendingnew

Changed December 16, 2010 10:52PM UTC by jitter comment:4

_comment0: Thanks for taking the time to contribute to the jQuery project by writing a bug report. The next time please pay attention to big red box which says \ > Please use [http://jsfiddle.net/ jsFiddle] when providing test cases and demonstrations instead of pasting the code in the ticket. \ \ [http://jsfiddle.net/jitter/uVWvV/ test case] \ \ I can reproduce this problem only on Safari 5 and current Chrome (IE6, Opera 10.63, FF 3.6.13/4.0b7, older Safari are fine). It looks like Webkit now passed the jQuery.support.checkClone check but still fails when appending checked inputs outside of forms. \ \ 1292539936739544
component: unfiledmanipulation
milestone: 1.next1.4.5
priority: undecidedhigh
status: newopen

Thanks for taking the time to contribute to the jQuery project by writing a bug report. The next time please pay attention to the big red box which says

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

test case

I can reproduce this problem only on Safari 5 and current Chrome (IE6, Opera 10.63, FF 3.6.13/4.0b7, older Safari are fine). It looks like Webkit now passed the jQuery.support.checkClone check but still fails when appending checked inputs outside of forms.

Changed July 12, 2011 04:07PM UTC by rwaldron comment:5

resolution: → worksforme
status: openclosed

Checked radios are correctly appending to all container elements.