From 02252d05310d799f2ceeafa32d0b213ecc4dbdba Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 16 Mar 2016 15:40:27 -0700 Subject: [PATCH] Work around regression in OO.ui.FloatableElement FloatableElement incorrectly believes it doesn't need to position itself when its closest scrollable is the same as the closest scrollable of the container. This causes the dotdotdot menu to be placed at the top left of the screen if the notifications popup is not scrollable. If it is scrollable, everything works fine. This regression was introduced by I5b5d7936c4d. Work around this by setting overflow-x: auto; on the popup body. This is a no-op, but tricks OOUI into thinking that the popup body is scrollable even when it visually isn't. We can't use overflow-y for this, because we still need to set overflow-y: auto; on the popup body to work around a Chrome bug where right-floated elements don't move over when the scrollbar appears. Bug: T130153 Change-Id: I8bd8a26a4931444a760d2159779240272c51f966 --- modules/ooui/styles/mw.echo.ui.NotificationBadgeWidget.less | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ooui/styles/mw.echo.ui.NotificationBadgeWidget.less b/modules/ooui/styles/mw.echo.ui.NotificationBadgeWidget.less index 7eeb63057..b4149b856 100644 --- a/modules/ooui/styles/mw.echo.ui.NotificationBadgeWidget.less +++ b/modules/ooui/styles/mw.echo.ui.NotificationBadgeWidget.less @@ -38,7 +38,9 @@ > .oo-ui-popupWidget-body { // Work around scrollbar rendering bug in Chrome - overflow: visible; + overflow-y: visible; + // Work around OO.ui.FloatableElement bug (T130153) + overflow-x: auto; } > .oo-ui-popupWidget-footer {