mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-23 23:54:43 +00:00
Fixed 432 - Fullscreen positioning don't work iPhone/Android/Desktop
- $.mobile.activePage isn't being set till *AFTER* the "pageshow" notification, so pass in the page from our pageshow callback into the show() method. - Also added missing getOffsetTop() call that I missed in my previous checkin.
This commit is contained in:
parent
e9d2c376fc
commit
dfa1a689a4
1 changed files with 4 additions and 4 deletions
|
|
@ -80,7 +80,7 @@ $.fixedToolbars = (function(){
|
|||
if( stickyFooter && stickyFooter.length ){
|
||||
stickyFooter.appendTo(event.target).css('top',0);
|
||||
}
|
||||
$.fixedToolbars.show(true);
|
||||
$.fixedToolbars.show(true, this);
|
||||
});
|
||||
|
||||
});
|
||||
|
|
@ -137,13 +137,13 @@ $.fixedToolbars = (function(){
|
|||
|
||||
//exposed methods
|
||||
return {
|
||||
show: function(immediately){
|
||||
show: function(immediately, page){
|
||||
currentstate = 'overlay';
|
||||
var $ap = $.mobile.activePage ? $.mobile.activePage : $(".ui-page-active");
|
||||
var $ap = page ? $(page) : ($.mobile.activePage ? $.mobile.activePage : $(".ui-page-active"));
|
||||
return $ap.children( toolbarSelector ).each(function(){
|
||||
var el = $(this),
|
||||
fromTop = $(window).scrollTop(),
|
||||
thisTop = el.offset().top,
|
||||
thisTop = getOffsetTop(el[0]), // el.offset().top returns the wrong value on iPad iOS 3.2.1, call our workaround instead.
|
||||
screenHeight = window.innerHeight,
|
||||
thisHeight = el.outerHeight(),
|
||||
alreadyVisible = (el.is('.ui-header-fixed') && fromTop <= thisTop + thisHeight) || (el.is('.ui-footer-fixed') && thisTop <= fromTop + screenHeight);
|
||||
|
|
|
|||
Loading…
Reference in a new issue