jenkins-bot has submitted this change and it was merged.

Change subject: Prevent horizontal scrollbar after menu closing animation
......................................................................


Prevent horizontal scrollbar after menu closing animation

If you close the menu with animations enabled, you can scroll
horizontally even thought there is not content to the right of the page.
This is caused by removing overflow: hidden while the transition is
still in progress.

The page gets wider when we open the nav because we translate
nav is open if it wasn't for overflow: hidden in .navigation-enabled
overflow: hidden is no longer applied and the horizontal scrollbar
appears just when the transition starts. Unfortunately, it stays there
because, I guess, Webkit doesn't recalculate the size of

overflow-x: hidden should be always safe since we force wrapping text.

Also, fix comment near overflow: hidden rule, it prevents both
horizontal and vertical scrolling.

Change-Id: Ia8d9e4228cc0109d7234c0612270081322786014
---
M less/common/mainmenu.less
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Jdlrobson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/less/common/mainmenu.less b/less/common/mainmenu.less
index 37f8286..52d1833 100644
--- a/less/common/mainmenu.less
+++ b/less/common/mainmenu.less
@@ -8,6 +8,8 @@
 #mw-mf-viewport {
        position: relative;
        height: 100%;
+       // opening nav transition can introduce a horizontal scrollbar without 
this
+       overflow-x: hidden;
 }
 
 #mw-mf-page-center {
@@ -162,7 +164,7 @@
 body.navigation-enabled {
 
        #mw-mf-viewport {
-               // disable horizontal scrolling
+               // disable scrolling
                overflow: hidden;
                // the two following properties are needed to override the 
height set
                // by position: fixed fallback on scroll event

-- 
To view, visit https://gerrit.wikimedia.org/r/132356
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia8d9e4228cc0109d7234c0612270081322786014
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera <jgon...@wikimedia.org>
Gerrit-Reviewer: Awjrichards <aricha...@wikimedia.org>
Gerrit-Reviewer: JGonera <jgon...@wikimedia.org>
Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org>
Gerrit-Reviewer: Kaldari <rkald...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to