Fix horizontal scroll issue when zooming

I've updated this PR to avoid the issues that @yurydelendik pointed out previously.

When testing this I also found that horizontal scrolling isn't really working in RTL locales in non-Mozilla browsers, hence I've disabled this feature to avoid issues. (This means that in RTL mode in other browsers, scrolling will work just like it did prior to #3967.)

Fixes #4186.