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

ClientRect is not defined #853

Closed
cpboyd opened this issue May 5, 2019 · 2 comments
Closed

ClientRect is not defined #853

cpboyd opened this issue May 5, 2019 · 2 comments

Comments

@cpboyd
Copy link
Contributor

cpboyd commented May 5, 2019

I've noticed that v.0.12 uses new ClientRect() in some places...

Well, I've been attempting to implement mdc-slider in React, and tried returning a new ClientRect() and got a ClientRect is not defined error.

Googling took me to: microsoft/TypeScript#18615

It seems that while TypeScript's typings still have ClientRect, Chrome has replaced it with DOMRect .

Further, DOMRect itself is experimental according to MDN: https://developer.mozilla.org/en-US/docs/Web/API/DOMRect

I'm not sure if these are getting properly polyfilled by Webpack and Babel either.

Was there a specific reason to switch from the explicit { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 } to new ClientRect()?

@moog16
Copy link
Contributor

moog16 commented May 6, 2019

@cpboyd - you're correct. These shouldn't have changed. I caught a few cases, but missed these. Would you mind fixing? Otherwise we will try to prioritize for future release. Thanks!

@moog16
Copy link
Contributor

moog16 commented May 10, 2019

closing for #855

@moog16 moog16 closed this as completed May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants