Page MenuHomePhabricator

Audit probably incorrect uses of .scrollLeft (bad scrolling-related operations in RTL)
Closed, ResolvedPublic


Different browsers have differing implementations of the .scrollLeft property for RTL content (nicely described at and it looks like we never handle these differences in OOUI, so presumably almost all of our usages of .scrollLeft result in incorrect behavior in RTL. We should look at them and fix them. adds OO.ui.Element.static.getScrollLeft(), which is a consistent getter method for this. There's no setter method currently.

Currently, the following functions use scrollLeft:

  • OO.ui.Element.static.getDimensions
  • OO.ui.Element.static.scrollIntoView
  • OO.ui.Element.static.reconsiderScrollbars
    • Looks OK, we don't look at the value, only get it and set it back.
  • OO.ui.mixin.ClippableElement.prototype.clip
    • This is actually $(window).scrollLeft(), which is another can of worms.

Event Timeline

Change 521389 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[oojs/ui@master] Element: Implement #setScrollLeft and use where needed

Change 521389 merged by jenkins-bot:
[oojs/ui@master] Element: Implement #setScrollLeft and use where needed

Change 521875 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[mediawiki/core@master] Update OOUI to v0.33.2

Change 521875 merged by jenkins-bot:
[mediawiki/core@master] Update OOUI to v0.33.2

matmarex edited projects, added OOUI (OOUI-0.33.2); removed OOUI.