Opened 15 years ago
Closed 14 years ago
#959 closed defect (wontfix)
Regression: dojo.html.getElementsByClass returns nothing if parentNode is not part of the DOM
Reported by: | anonymous | Owned by: | dylan |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | HTML | Version: | 0.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Execute the following in Firebug:
foo = dojo.html.createNodesFromText('<div><span class="bar"></span></div>')[0] dojo.html.getElementsByClass("bar", foo)
foo is a div containing a span with class "bar". So you would expect getElementsByClass("bar", foo) to return the span. However it returns an empty array in Dojo 0.3.1.
This worked in Dojo 0.3.0
What may be happening is that the new XQuery implementation of dojo.html.getElementsByClass may not work if the parent is not connected to the DOM?
Change History (9)
comment:1 Changed 15 years ago by
Milestone: | → 0.4 |
---|---|
Owner: | changed from anonymous to dylan |
comment:2 Changed 15 years ago by
Status: | new → assigned |
---|
comment:3 Changed 14 years ago by
Component: | General → HTML |
---|---|
Owner: | changed from dylan to Bryan Forbes |
Status: | assigned → new |
comment:4 Changed 14 years ago by
comment:5 Changed 14 years ago by
Milestone: | 0.4 → 0.4.1 |
---|
comment:6 Changed 14 years ago by
Milestone: | 0.4.1 → 0.5 |
---|
This is working as per temporary fix above.
comment:7 Changed 14 years ago by
Owner: | changed from Bryan Forbes to dylan |
---|---|
Status: | new → assigned |
comment:8 Changed 14 years ago by
getElementsByClass() was replaced in 0.9 by dojo.query. Not sure if we support createNodesFromText or if this interaction would still fail
comment:9 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
I suggest we disable the xpath version of this until we can fully test it... Bryan, can you handle this.