bvaughn / react-window

React components for efficiently rendering large lists and tabular data
https://react-window.now.sh/
MIT License
15.72k stars 782 forks source link

Rtl layout not working correctly on devices with display scaling enabled #649

Closed amiralies closed 3 weeks ago

amiralies commented 2 years ago

This happens on chrome.

from mdn scrollLeft docs:

Warning: On systems using display scaling, scrollLeft may give you a decimal value.

This line https://github.com/bvaughn/react-window/blob/master/src/domHelpers.js#L59 returns a value arond 0.5 when display scaling is enabled and 0 when device is using default display scaling.

I think the approach in this library work arounds this

amiralies commented 2 years ago

https://user-images.githubusercontent.com/13261088/171149672-3319a7ea-f731-40f6-b445-c4d506407e43.mp4

This is the behavior when display scaling (found on accessiblity settings on android devices) is in use.