Browse Source

Scroll fixes for FxMobile. Android & iOS still broken.

Nathaniel van Diepen 11 years ago
parent
commit
f04c642094
3 changed files with 7 additions and 4 deletions
  1. 0 1
      css/style.css
  2. 1 1
      index.php
  3. 6 2
      js/index.js

+ 0 - 1
css/style.css

@@ -69,7 +69,6 @@ a.topbar-home:hover{
 div#content{
 	width: 100%;
 	height: calc(100% - 35px);
-	overflow: auto;
 }
 div#loading{
 	width: 100%;

+ 1 - 1
index.php

@@ -57,7 +57,7 @@
 <html>
 	<head>
 		<meta charset=utf-8>
-		<meta name="viewport" content="width=device-width, user-scalable=false, initial-scale=1, maximum-scale=1.0, user-scalable=0">
+		<meta name="viewport" content="width=device-width, user-scalable=false, initial-scale=1, maximum-scale=1.0, user-scalable=0, user-scalable=no">
 		<meta name="apple-mobile-web-app-capable" content="yes" />
 		<title>Bugs</title>
 		<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>

+ 6 - 2
js/index.js

@@ -132,6 +132,7 @@
 					Handlebars.compile(t)(c)
 				);
 				render.links('#content');
+				$(window).resize();
 			},
 			links: function(selector){
 				$(selector).find('a').each(function(){
@@ -224,9 +225,11 @@
 			});
 		},'json');
 		$('#content').niceScroll({
-			cursorwidth: 10
+			cursorwidth: 10,
+			nativeparentscrolling: false,
+			preservenativescrolling: false
 		});
-		document.body.addEventListener('touchstart',function(e){
+		document.addEventListener('touchmove',function(e){
 			e.preventDefault();
 		});
 	});
@@ -235,6 +238,7 @@
 			$('#topbar div.topbar-right, #topbar div.topbar-left').css({
 				'display': ''
 			});
+			$('#content').getNiceScroll().resize();
 		}
 	});
 	shortcut.add('f12',function(){