Bug Tracker

Opened 6 years ago

Closed 6 years ago

#13831 closed bug (invalid)

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.

Change History (3)

comment:1 Changed 6 years ago by dmethvin

Owner: set to 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.

comment:2 Changed 6 years ago by gibson042

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

comment:3 Changed 6 years ago by trac-o-bot

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!

Note: See TracTickets for help on using tickets.