YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub

YUI 2.x

Ticket #2527892 (closed defect)

Reporter


Nicholas C. Zakas
Opened: 05/13/09
Last modified: 06/24/09
Status: closed
Type: defect

Owner


Matt Sweeney
Target Release: 3.0.0 Beta1
Priority: P3 (normal)
Summary: [bz 2730701] query fails for off-dom nodes
Description:

I've not been able to explain why this happens, but it happens very regularly. This used to work
fine in PR2 and no longer works in this release. If I try to create a <li> element containing an <a> using
Y.Node.create(), I can't access the <a> tag using query() even though it is present.

Type: defect Observed in Version: development master
Component: Node Severity: S3 (normal)
Assigned To: Matt Sweeney Target Release: 3.0.0 Beta1
Location: Library Code Priority: P3 (normal)
Tags: Relates To:
Browsers: N/A
URL:
Test Information:

var node = Y.Node.create("<li><a href=""></a></li>");
alert(node.get("innerHTML")); //"<a href=""></a>"
var link = node.query("a"); //<-- ends up null

Change History

George

YUI Developer

Posted: 05/13/09
  • summary changed from Y.Node.create() malfunctions to [bz 2730701] Y.Node.create() malfunctions

Matt Sweeney

YUI Developer

Posted: 05/14/09
  • milestone changed to 3.0.0 Beta1
  • status changed from new to accepted
  • summary changed from [bz 2730701] Y.Node.create() malfunctions to [bz 2730701] query fails for off-dom nodes

Corrected title to reflect actual issue.

Matt Sweeney

YUI Developer

Posted: 05/14/09
  • status changed from accepted to checkedin

George

YUI Developer

Posted: 06/24/09
  • status changed from checkedin to closed

Changing bug state from checkedin to closed as all changes are now available in 3.0.0 beta 1