scroll-into-view-if-needed
scroll-into-view-if-needed copied to clipboard
Horizontal RTL scrolling goes wrong way
I've noticed that scrolling a horizontal group of elements that are in right-to-left (RTL) writing mode scrolls to the wrong end of the list. The native API seems to handle this case, so I believe it's a bug.
Reproduction in this pen. Instructions on the page.
Thanks so much!
Is this going to be fixed any time soon?
This is breaking libraries which rely on this specific library (e.g. https://github.com/asmyshlyaev177/react-horizontal-scrolling-menu).
Is this going to be fixed any time soon?
This is breaking libraries which rely on this specific library (e.g. https://github.com/asmyshlyaev177/react-horizontal-scrolling-menu).
My library can work without polyfill, but this polyfill is good, I hope bug with RTL will be fixed.
Can detect RTL
on body like this
const direction = window.getComputedStyle(document.body, null).getPropertyValue('direction');
From here https://stackoverflow.com/a/16958416/5538912
any update?
This library is a life savior, but I too am affected by this and would love it if this bug was addressed 🙏
For information, I did a PR a few months back to add support for RTL in the base library (PR here: https://github.com/scroll-into-view/compute-scroll-into-view/pull/907)
I am still waiting for it to be merged but I did not receive answer from the maintainers yet.