Uncaught TypeError: elem.getBoundingClientRect is not a function
- Dominant language
- JavaScript
- Stars
- 29.8k
- Forks
- 5.4k
- Avg merge
- 25m
- Merged PRs (30d)
- 1
Description
jquery version : jquery-3.6.1.min.js
jquery version : migrate3.4.0.js
Google Chrome : latest
foundation version : latest
Problems when changing browser width
Uncaught TypeError: elem.getBoundingClientRect is not a function
at Object.GetDimensions (foundation.util.box.js:84:19)
at Dropdown._setPosition (foundation.positionable.js:174:82)
at Dropdown._setPosition (foundation.dropdown.js:168:71)
at HTMLDivElement.dispatch (jquery-3.6.1.min.js?ver=3.6.1:2:43064)
at y.handle (jquery-3.6.1.min.js?ver=3.6.1:2:41048)
at Object.trigger (jquery-3.6.1.min.js?ver=3.6.1:2:71659)
at e.event.trigger (jquery-migrate.min.js?ver=1.2.1:2:6732)
at e.fn.init.triggerHandler (jquery-3.6.1.min.js?ver=3.6.1:2:72338)
at MutationObserver.listeningElementsMutation (foundation.util.triggers.js:215:19)
Contributor guide
Research direction
Start by reproducing the error while changing the browser width, then trace the call chain from foundation.util.box.js:84 through foundation.positionable.js:174 and foundation.dropdown.js:168. Compare the element received by GetDimensions with the MutationObserver path in foundation.util.triggers.js:215; done means dropdown repositioning no longer raises the TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100