Permalink
Browse files

Moved getScreenHeight to core

  • Loading branch information...
1 parent ba3f22c commit 80ba4095affb98ea8a27089d230e4e6c976d663a @gseguin gseguin committed Jun 23, 2012
Showing with 9 additions and 10 deletions.
  1. +6 −0 js/jquery.mobile.core.js
  2. +3 −10 js/jquery.mobile.navigation.js
View
@@ -239,6 +239,12 @@ define( [ "jquery", "../external/requirejs/text!../version.txt", "./jquery.mobil
}
return $newSet;
+ },
+
+ getScreenHeight: function(){
+ // Native innerHeight returns more accurate value for this across platforms,
+ // jQuery version is here as a normalized fallback for platforms like Symbian
+ return window.innerHeight || $( window ).height();
}
}, $.mobile );
@@ -371,7 +371,9 @@ define( [
documentBase = $base.length ? path.parseUrl( path.makeUrlAbsolute( $base.attr( "href" ), documentUrl.href ) ) : documentUrl,
//cache the comparison once.
- documentBaseDiffers = ( documentUrl.hrefNoHash !== documentBase.hrefNoHash );
+ documentBaseDiffers = ( documentUrl.hrefNoHash !== documentBase.hrefNoHash ),
+
+ getScreenHeight = $.mobile.getScreenHeight;
//base element management, defined depending on dynamic base tag support
var base = $.support.dynamicBaseTag ? {
@@ -531,15 +533,6 @@ define( [
}
//simply set the active page's minimum height to screen height, depending on orientation
- function getScreenHeight(){
- // Native innerHeight returns more accurate value for this across platforms,
- // jQuery version is here as a normalized fallback for platforms like Symbian
- return window.innerHeight || $( window ).height();
- }
-
- $.mobile.getScreenHeight = getScreenHeight;
-
- //simply set the active page's minimum height to screen height, depending on orientation
function resetActivePageHeight(){
var aPage = $( "." + $.mobile.activePageClass ),
aPagePadT = parseFloat( aPage.css( "padding-top" ) ),

0 comments on commit 80ba409

Please sign in to comment.