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

Need to check whether element is instance of Element or not? #1

Open
liboshi opened this issue Dec 9, 2019 · 4 comments
Open

Need to check whether element is instance of Element or not? #1

liboshi opened this issue Dec 9, 2019 · 4 comments

Comments

@liboshi
Copy link

liboshi commented Dec 9, 2019

if (!this.resizeObserver && element) {

Currently, error occurred when element is not an instance of Element:

'observe' on 'ResizeObserver': parameter 1 is not of type 'Element'.

@liboshi
Copy link
Author

liboshi commented Apr 9, 2020

@zombieJ How about this issue? Anyone can help?

@zombieJ
Copy link
Member

zombieJ commented Apr 9, 2020

@liboshi , could you provide a reproduce?

@tomaszcoding
Copy link

Hi, I have the same problem. ResizeObserver throws that error also when it gets a Proxy object.
Even though it proxies an object of type Element.
Table component from @ant-design/pro-layout is a good example: https://stackblitz.com/edit/rc-resize-observer-bug?file=src%2FApp.js

@tomaszcoding
Copy link

Oh, it's actually a problem of resize-observer-polyfill, not the resize-observer itself: que-etc/resize-observer-polyfill#95
To solve it, simply put a div directly inside the ResizeObserver and place the rest inside the div.

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

3 participants