Skip to main content

Bug Tracker

Side navigation

#13831 closed bug (invalid)

Opened April 27, 2013 02:43PM UTC

Closed May 12, 2013 08:47AM UTC

bug with $(domelement).text(undefined)

Reported by: ranjitsss Owned by: ranjitsss
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:
Description

Essentially

var b={};

$("selector").append($("<table></table>").append($("<tr></tr>").append($("<td></td>").text(b.id))))

will not create any dom element since b.id is undefined.

But in Jquery 1.9.1 its appending dom element in selector.

M not sure whether its a bug or not but in previous version this was not the case.

Attachments (0)
Change History (3)

Changed April 27, 2013 03:45PM UTC by dmethvin comment:1

owner: → ranjitsss
status: newpending

Hi, can you put an example on jsfiddle.net or jsbin.com that demonstrates the problem? I can't imagine a selected element that would let you append a <table>, <tr>, and <td> to it. And, according to the documentation, .text() wants a string, which undefined is not.

Changed April 27, 2013 04:06PM UTC by gibson042 comment:2

You might want to fork from this, which is a "works for me" copy of your use case: http://jsfiddle.net/ATSwk/

Changed May 12, 2013 08:47AM UTC by trac-o-bot comment:3

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!