Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: t.getBoundingClientRect is not a function #4459

Closed
1 of 8 tasks
valdrinkoshi opened this issue Mar 24, 2017 · 6 comments
Closed
1 of 8 tasks

TypeError: t.getBoundingClientRect is not a function #4459

valdrinkoshi opened this issue Mar 24, 2017 · 6 comments

Comments

@valdrinkoshi
Copy link
Member

From @camargo on March 24, 2017 19:24

Description

This is the same issue as #44.

Expected outcome

No error should be thrown.

Actual outcome

Getting the error in the console:

TypeError: t.getBoundingClientRect is not a function

This is being triggered by https://github.com/PolymerElements/iron-overlay-behavior/blob/master/iron-overlay-manager.html#L46

capture

Steps to reproduce

  1. Open Firefox
  2. Go to https://www.webcomponents.org/element/PolymerElements/iron-overlay-behavior/demo/demo/index.html
  3. Make your window smaller than your screen
  4. Click down on the Plain overlay button
  5. Drag your cursor while still clicked down outside of the browser window
  6. Release click outside the browser window
  7. The error will be in the console

Browsers Affected

  • Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10

Copied from original issue: PolymerElements/iron-overlay-behavior#235

@valdrinkoshi
Copy link
Member Author

In Firefox apparently the event.target is document, while in the other browsers is document.documentElement (aka <html>), see a simpler repro http://jsbin.com/mabisob/2/edit?html,console,output
This issue should be resolved in Polymer.Gestures, will move the issue there.

@valdrinkoshi
Copy link
Member Author

valdrinkoshi commented Mar 24, 2017

@azakus FYI, this is a good to know behavior also for Polymer's Gesture system in 2.x.
Gestures should probably check for event.target.nodeType === Node.ELEMENT_NODE

@dfreedm
Copy link
Member

dfreedm commented Apr 4, 2017

😩

@dfreedm
Copy link
Member

dfreedm commented Apr 4, 2017

I can't replicate this on Firefox 52, maybe this has fixed itself?

@dfreedm
Copy link
Member

dfreedm commented Apr 4, 2017

In any case, I'll make sure this code path doesn't happen for non-elements just to cover all the bases

@jfrazzano
Copy link

jfrazzano commented Apr 5, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants