Re-add ltr/rtl detection and make getMousePosition work correctly with rtl again when scrolled.