Brion VIBBER has submitted this change and it was merged.

Change subject: Fix for scrolling when TOC onscreen.
......................................................................


Fix for scrolling when TOC onscreen.

Needed because we added doctype so no longer using "quirks" mode.
So we we need to specify "px" for spacer height now.

Change-Id: Iea4422fbdad723daffb0201c95211bede07fb8b8
---
M wikipedia/View Controllers/WebView/WebViewController.m
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Looks good to me, approved



diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index ea78b64..3ef3862 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -1844,7 +1844,10 @@
 
             // This is important! Ensures bottom of web view article can be 
scrolled closer to the top of
             // the screen. Works in conjunction with "limitScrollUp:" method.
-            [sectionTextArray addObject: [NSString stringWithFormat:@"<div 
style='height:%d;background-color:white;'></div>", BOTTOM_SCROLL_LIMIT_HEIGHT]];
+            // Note: had to add "px" to the height because we added "<!DOCTYPE 
html>" to the top
+            // of the index.html - it won't actually give the div height w/o 
this now (no longer
+            // using quirks mode now that doctype specified).
+            [sectionTextArray addObject: [NSString stringWithFormat:@"<div 
style='height:%dpx;background-color:white;'></div>", 
BOTTOM_SCROLL_LIMIT_HEIGHT]];
         }
 
         

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iea4422fbdad723daffb0201c95211bede07fb8b8
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd <mh...@wikimedia.org>
Gerrit-Reviewer: Brion VIBBER <br...@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