You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the dir attribute of an ancestor node is set to "rtl" compute-scroll-into-view calculates the wrong scrollLeft positions.
To illustrate this I've created a jsfiddle - https://jsfiddle.net/6ckneau1/1/. When you click the "Scroll 7 into view" button in the LTR example it works just fine. When you click the "Scroll 7 into view" in the RTL example it doesn't scroll it into view.
I'm also trying to migrate all our scroll logic to this library, unfortunately RTL is indeed not working at all. Is there any plan to add support for RTL? :)
When the
dir
attribute of an ancestor node is set to "rtl" compute-scroll-into-view calculates the wrong scrollLeft positions.To illustrate this I've created a jsfiddle - https://jsfiddle.net/6ckneau1/1/. When you click the "Scroll 7 into view" button in the LTR example it works just fine. When you click the "Scroll 7 into view" in the RTL example it doesn't scroll it into view.
The bug is caused by the way browsers report/use scrollLeft when in RTL. You may want to use a library like this https://github.com/alitaheri/normalize-scroll-left to address this issue.
The text was updated successfully, but these errors were encountered: