nkbt/react-collapse

React-collapse does not work on some zoom levels (devicePixelRatio =1.25) Following up #238

mlp73 opened this issue · 1 comments

mlp73 commented

As i cannot reopen the previous issue #238 I create a new one following it up.

Using react collapse 5.0.0 I can confirm that the issue persists.

overflow: hidden is set while the animation is going on, and set back to auto at the end. It calculates what will be the final height but because of it counting based on half-pixels because of devicePixelRatio it seems that it never finishes. Så overflow:hidden is then never removed.

I can reproduce everywhere react-collapse is used by using devicePixelRatio = 1.25.
On my very screen it is with a 110% zoom. For some of our testers it is whit 75% zoom, so it depend on your resolution. (When you zoom +/-, the devicePixelRatio changes, and it happens always with devicePixelRatio = 1.25)
To know which devicePixelRatio you have on your window, you can write window.devicePixelRatio in the console.

@nkbt Is it something you could try to reproduce?

nkbt commented

#238 is reopened