From 643781375d35b8fa61f8d9cb6d3edce950f40db3 Mon Sep 17 00:00:00 2001 From: Bala Clark Date: Sun, 18 Aug 2013 21:13:24 +0200 Subject: [PATCH] iOS webapp enhancements --- css/styles.css | 6 ++++++ examples/basic.html | 4 ++++ examples/dev.html | 2 ++ examples/file.html | 4 ++++ lib/ComicBook.js | 6 ++++++ 5 files changed, 22 insertions(+) diff --git a/css/styles.css b/css/styles.css index 91750c5..864767f 100755 --- a/css/styles.css +++ b/css/styles.css @@ -74,3 +74,9 @@ body:not(.mobile) .navigate:hover { background: #86C441; border-color: #3E7600; } + +* { + -webkit-user-select: none; + -webkit-touch-callout: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); +} diff --git a/examples/basic.html b/examples/basic.html index e5ffb25..2d60f27 100755 --- a/examples/basic.html +++ b/examples/basic.html @@ -3,7 +3,11 @@ + + + Basic + diff --git a/examples/dev.html b/examples/dev.html index c3d2659..aaa0109 100755 --- a/examples/dev.html +++ b/examples/dev.html @@ -3,6 +3,8 @@ + + Dev diff --git a/examples/file.html b/examples/file.html index a123d3a..71921de 100644 --- a/examples/file.html +++ b/examples/file.html @@ -9,7 +9,11 @@ + + + App + diff --git a/lib/ComicBook.js b/lib/ComicBook.js index af99fe8..684f498 100755 --- a/lib/ComicBook.js +++ b/lib/ComicBook.js @@ -91,10 +91,16 @@ var ComicBook = (function ($) { this.isMobile = false; + // mobile enhancements if (navigator.userAgent.match(/mobile/i)) { this.isMobile = true; document.body.classList.add('mobile'); defaults.displayMode = 'single'; + window.addEventListener("load",function() { + setTimeout(function() { + window.scrollTo(0, 1); + }, 0); + }); } var options = merge(defaults, opts); // options array for internal use