#971 closed defect (fixed)
dojo.html.getElementsByClass doesn't respect the scoping node on firefox
Reported by: | Owned by: | anonymous | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | General | Version: | 0.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
When using dojo.html.getElementsByClass, the scoping node is not respected on firefox (or possibly other browsers that supports document.evaluate). Attached is a patch to test_html.html that repros the problem.
Attachments (2)
Change History (7)
Changed 15 years ago by
Attachment: | scoped_getElementsByClass_test.patch added |
---|
comment:1 Changed 15 years ago by
Version: | 0.2 → 0.4 |
---|
Also, I have a CLA on file. Probably under ben AT blowery.org (Ben Lowery)
comment:2 Changed 15 years ago by
Milestone: | → 0.4 |
---|---|
Version: | 0.4 → 0.3 |
Just fixing (the cryptic) version and milestone fields.
comment:3 Changed 15 years ago by
Here's the fix which was posted as #1079:
change
var xpath = "//" + (nodeType "*") + "[contains(";
to
var xpath = ".//" + (nodeType "*") + "[contains(";
in dojo.html.getElementsByClass
Meanwhile a work-around is to specify true
as the fifth (useNonXpath
) argument to dojo.html.getElementsByClass(). An example:
dojo.html.getElementsByClass("classname", parent, null, null, true)
instead of the non-functional
dojo.html.getElementsByClass("classname", parent)
Changed 15 years ago by
Attachment: | dojo.html.getElementsByClass-xpath-fix.diff added |
---|
patch verified to work in Firefox 1.5.0.4 and Epiphany 2.14.1.1
comment:4 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in the html-refactor.
test case patch for test_html.html