jquery: TypeError: elem.getClientRects is not a function
I ran into this issue after jquery@2.2.0 was installed during a unit test build:
- TypeError: elem.getClientRects is not a function at Array.jQuery.expr.filters.visible (site/node_modules/somepackage/node_modules/jquery/dist/jquery.js:8909:63) at site/node_modules/somepackage/node_modules/jquery/dist/jquery.js:2198:22 at superMatcher (site/node_modules/somepackage/node_modules/jquery/dist/jquery.js:2419:12) at Sizzle.select (site/node_modules/somepackage/node_modules/jquery/dist/jquery.js:2599:44) at Sizzle (site/node_modules/somepackage/node_modules/jquery/dist/jquery.js:864:9) at Function.Sizzle.matches (site/node_modules/somepackage/node_modules/jquery/dist/jquery.js:1400:9) at Function.jQuery.filter (site/node_modules/somepackage/node_modules/jquery/dist/jquery.js:2764:15) at winnow (site/node_modules/somepackage/node_modules/jquery/dist/jquery.js:2744:18) at [object Object].jQuery.fn.extend.filter (site/node_modules/somepackage/node_modules/jquery/dist/jquery.js:2796:26) at Object.kickOffMethod (site/file.js:24:16)
note: site/node_modules/somepackage
is an internal package so I just masked it with that path
When I install jquery@2.1.4, all of my unit tests pass.
I poked around at my source and i see it trying to use the :visible
filter like so:
$('selector:visible');
and it seems to be failing there.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 17 (7 by maintainers)
Links to this issue
Commits related to this issue
- Push jquery version up to address getClientRects build issue See https://github.com/jquery/jquery/issues/2804 — committed to lm-tools/choose-your-activities by deleted user 7 years ago
@cancerberoSgx “this” was fixed several months ago in jsdom, unless you are referring to a different “this”.