#3255 closed bug (fixed)
$().attr does not work popperly with type
Reported by: | Licenser | Owned by: | flesler |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | core | Version: | 1.2.6 |
Keywords: | exception type input | Cc: | Licenser |
Blocked by: | Blocking: |
Description
When creating a new html element via $() using .attr() to set the type of the input causes a expection that type can't be changed.
var checkbox = $('<input/>'); checkbox.attr('type', 'checkbox'); // => exception
a workaround is:
var checkbox = $('<input type="checkbox"/>');
Attachments (3)
Change History (7)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Owner: | set to flesler |
---|---|
Status: | new → assigned |
Changed 14 years ago by
Attachment: | clean[5831].diff added |
---|
For some reason it makes a test fail.. but seems like a feasible solution
Changed 14 years ago by
Attachment: | clean[5831].v2.diff added |
---|
Alternate solution, no test fail, don't ask why!!!
comment:3 Changed 14 years ago by
Cc: | Licenser added |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Fixed at [5999].
Note: See
TracTickets for help on using
tickets.
The fix for this will probably appear in jQuery.clean(). Once appending the HTML string to that temporary div, parentNode will no longer return undefined and the throw will be executed: