Opened 9 years ago
Closed 7 years ago
#17281 closed defect (fixed)
[patch][cla] on.selector matchesTarget.matches is not a function
Reported by: | iCanDo | Owned by: | dylan |
---|---|---|---|
Priority: | undecided | Milestone: | 1.10.5 |
Component: | Events | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
The line 187 in on.js
matchesTarget = matchesTarget && matchesTarget.matches ? matchesTarget : dojo.query;
sometimes produces error of type "matchesTarget.matches is not a function".
This change fix the error:
matchesTarget = matchesTarget && typeof matchesTarget.matches == "function" ? matchesTarget : dojo.query;
Change History (5)
comment:1 Changed 7 years ago by
Milestone: | tbd → 1.11 |
---|---|
Owner: | set to iCanDo |
Status: | new → pending |
comment:2 Changed 7 years ago by
Status: | pending → new |
---|
Only 0.0005% of the Firefox and Chrome visitors hit the error.
Firefox 21-22: TypeError?: s.matches is not a function
Chrome 27: Uncaught TypeError?: Property 'matches' of object [object global] is not a function
comment:3 Changed 7 years ago by
Summary: | on.selector matchesTarget.matches is not a function → [patch][cla] on.selector matchesTarget.matches is not a function |
---|
comment:4 Changed 7 years ago by
Owner: | changed from iCanDo to dylan |
---|---|
Status: | new → assigned |
comment:5 Changed 7 years ago by
Milestone: | 1.11 → 1.10.5 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Fixed in https://github.com/dojo/dojo/commit/a19a1c7aca0ce5fe473c848210077bbbd3955698 , backported as https://github.com/dojo/dojo/commit/71ef096d7f0829dfcaa5a5dfbf3e8f739d9aa478 . Did not cleanly apply prior to 1.10, so I stopped there. If you need it further backported, please create a PR against 1.9.
Hmmm, I thought this bug was typically the result of forgetting to require dojo/query as a dependency when doing event delegation, e.g. https://www.sitepen.com/blog/2012/10/31/debugging-dojo-common-error-messages/#forgot-dojo-query
Is there another condition where you're actually seeing this issue iDo?