#16678 closed defect (fixed)
Dojo Selector Engine lite.js fails to find #id when root document is set
Reported by: | chris2m | Owned by: | Kris Zyp |
---|---|---|---|
Priority: | undecided | Milestone: | 1.9 |
Component: | Query | Version: | 1.8.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
The lite query engine in dojo fails to retrieve simple "#id" queries when the root node is in a different frame than dojo. This is because lite.js uses a "fast path" and ignores the root document in line 36:
var found = dojo.byId ? dojo.byId(match[2]) : doc.getElementById(match[2]);
should be
var found = dojo.byId ? dojo.byId(match[2], root) : root.getElementById(match[2]);
Best, Chris
Change History (3)
comment:1 Changed 8 years ago by
comment:3 Changed 8 years ago by
Milestone: | tbd → 1.9 |
---|
Note: See
TracTickets for help on using
tickets.
or rather: var found = dojo.byId ? dojo.byId(match[2], doc) : doc.getElementById(match[2]);