Opened 5 years ago

Closed 5 years ago

#18193 closed defect (invalid)

domNode and query results

Reported by: dojonovice@… Owned by: dojonovice@…
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.10.0
Keywords: Cc:
Blocked By: Blocking:

Description

I am using own templated widget inside another own templated widget.

this.domNode

returns

<div>

<div id="dgridPlace_${id}"></div>

</div>


query("div", this.domNode)[0]

returns

<div id="dgridPlace_id_1"></div>

result is ok


query("#dgridPlace_id_1", this.domNode)

returns

[]

result is wrong

this.domNode doesnt support getElementById and if I use query() with id, query() returns empty array.

Is this behavior correct?

Change History (2)

comment:1 Changed 5 years ago by ben hockey

Owner: set to dojonovice@…
Status: newpending

is your domNode attached to the document when you run this query? i'm going to assume it's not and in that case the behavior is expected.

also, you're better off using an attach point than querying for the node.

comment:2 Changed 5 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.