Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

TypeError: t.getBoundingClientRect is not a function #235

Closed
1 of 8 tasks
camargo opened this issue Mar 24, 2017 · 5 comments · Fixed by #239
Closed
1 of 8 tasks

TypeError: t.getBoundingClientRect is not a function #235

camargo opened this issue Mar 24, 2017 · 5 comments · Fixed by #239

Comments

@camargo
Copy link
Contributor

camargo commented Mar 24, 2017

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
@valdrinkoshi
Copy link
Member

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

This issue was moved to Polymer/polymer#4459

@camargo
Copy link
Contributor Author

camargo commented Mar 24, 2017

@valdrinkoshi Right now the gesture is being added to document (https://github.com/PolymerElements/iron-overlay-behavior/blob/master/iron-overlay-manager.html#L46). Could we add it to body or html. That could fix the issue.

@valdrinkoshi
Copy link
Member

I'd do document.documentElement for all of these https://github.com/PolymerElements/iron-overlay-behavior/blob/master/iron-overlay-manager.html#L46-L49 👌
PRs welcome 😃

@camargo
Copy link
Contributor Author

camargo commented Mar 24, 2017

@valdrinkoshi Alright that should do it, please ignore the first one. This fixes the error.

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

Successfully merging a pull request may close this issue.

2 participants