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

ResizeObserver sometimes provides list with an invalid size #1200

Closed
niik opened this issue Apr 13, 2017 · 1 comment
Closed

ResizeObserver sometimes provides list with an invalid size #1200

niik opened this issue Apr 13, 2017 · 1 comment
Assignees

Comments

@niik
Copy link
Member

niik commented Apr 13, 2017

Reported by @shiftkey

image

And seen by donokuda

image

When @shiftkey saw it he also reported that the tab bar in the sidebar was squished

image


I have not been able to reproduce this yet but looking at these screenshots it's pretty clear that what's happening is that the list is not auto-sizing correctly which means that this is very likely a bug related to us ditching react-virtualized's AutoSizer component for ResizeObserver in #1126.

The fact that @donokuda's screnshot shows the foldout rendering underneath the toolbar item is also highly interesting although I'm not able to draw any conclusions based on that just yet.

I imagine that the squished tab bar that @shiftkey was seeing is also related to the resize observer giving the file list an invalid height. When I artificially add an some extra height to the list I'm able to get the same behavior

image

What we know

Theories

  • High-dpi?
  • Race condition with the resize observer callback
@niik
Copy link
Member Author

niik commented Apr 13, 2017

Bingo, I'm able to reproduce this when running at 200% DPI

image

Seems like the resize observer is not taking scaling into account somehow

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