From 7dd74187b0805f91006a690fb4e0ac6e3feeb79f Mon Sep 17 00:00:00 2001 From: Kevin Glowacz Date: Tue, 23 Jun 2009 01:52:25 +0000 Subject: [PATCH] (trunk web) hide the iPhone address bar on orientation change --- web/javascript/common.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/javascript/common.js b/web/javascript/common.js index 1e168d52d..b1ed84bda 100644 --- a/web/javascript/common.js +++ b/web/javascript/common.js @@ -70,11 +70,14 @@ $(document).ready( function() { // different padding. $('div.dialog_container div.dialog_window a').css('padding', '2px 10px 3px'); } - if (iPhone) + if (iPhone){ + window.onload = function(){ setTimeout(function() { window.scrollTo(0,1); },500); }; + window.onorientationchange = function(){ setTimeout( function() { window.scrollTo(0,1); },100); }; if(window.navigator.standalone) // Fix min height for iPhone when run in full screen mode from home screen // so the footer appears in the right place $('body div#torrent_container').css('min-height', '338px'); + } }); /*