Browse Source

Removed the stupid mobile scrollbar.

Nathaniel van Diepen 10 years ago
parent
commit
db4358199d
2 changed files with 19 additions and 10 deletions
  1. 5 3
      css/style.css
  2. 14 7
      js/index.js

+ 5 - 3
css/style.css

@@ -2,7 +2,7 @@
 html,body{
 	width: 100%;
 	height: 100%;
-	overflow: hidden;
+	overflow-x: hidden;
 	padding: 0;
 	margin: 0;
 }
@@ -69,6 +69,8 @@ form#form{
 	top: 0 !important;
 }
 div#topbar{
+	position: fixed;
+	z-index: 1000;
 	width: calc(100% + 1px);
 	background-color: #CD6723;
 	background: url(../img/headers/ui/header.png) repeat-x 0 0;
@@ -121,8 +123,8 @@ div.topbar-left{
 }
 div#content{
 	width: 100%;
-	-webkit-overflow-scrolling: touch;
-	overflow: auto;
+	position: absolute;
+	top: 50px;
 	padding-top: 5px;
 }
 div#loading{

+ 14 - 7
js/index.js

@@ -710,11 +710,11 @@
 		if(!exists($.support.touch)){
 			$.support.touch = 'ontouchstart' in window || 'onmsgesturechange' in window;
 		}
-		$('#content').niceScroll({
-			cursorwidth: 10,
-			nativeparentscrolling: false,
-			preservenativescrolling: false
-		});
+		// $('#content').niceScroll({
+		// 	cursorwidth: 10,
+		// 	nativeparentscrolling: false,
+		// 	preservenativescrolling: false
+		// });
 		$('#content,#topbar').click(function(){
 			$('.menu').hide();
 		});
@@ -727,8 +727,15 @@
 					'display': ''
 				});
 			}
-			$('#content').height($('body').height()-$('#topbar').height());
-			$('#content').getNiceScroll().resize();
+			// var c = $('#content'),
+			// 	flag = c.get(0).scrollHeight-c.scrollTop() == c.outerHeight();
+			// c.height($('body').height()-$('#topbar').height());
+			// c.getNiceScroll().resize();
+			// if(flag){
+			// 	c.animate({
+			// 		scrollTop: c.height()
+			// 	},'slow');
+			// }
 			render.inputs('#content');
 			render.inputs('#topbar');
 		});