mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-19 23:40:25 +00:00
Fixed check for relative vs. absolute positioning of fixed toolbars. Now fullscreen toolbars will work as expected. Fixes #132
This commit is contained in:
parent
00d8f6b62d
commit
f5ebfbcbd2
1 changed files with 3 additions and 2 deletions
|
|
@ -89,16 +89,17 @@ $.fixedToolbars = (function(){
|
|||
thisCSStop = el.css('top') == 'auto' ? 0 : parseFloat(el.css('top')),
|
||||
screenHeight = window.innerHeight,
|
||||
thisHeight = el.outerHeight(),
|
||||
useRelative = el.parents('.ui-page:not(.ui-page-fullscreen)').length,
|
||||
relval;
|
||||
if( el.is('.ui-header-fixed') ){
|
||||
relval = fromTop - thisTop + thisCSStop;
|
||||
if( relval < thisTop){ relval = 0; }
|
||||
return el.css('top', (el.parents('.ui-page').length) ? relval : fromTop);
|
||||
return el.css('top', ( useRelative ) ? relval : fromTop);
|
||||
}
|
||||
else{
|
||||
relval = -1 * (thisTop - (fromTop + screenHeight) + thisCSStop + thisHeight);
|
||||
if( relval > thisTop ){ relval = 0; }
|
||||
return el.css('top', (el.parents('.ui-page').length) ? relval : fromTop + screenHeight - thisHeight );
|
||||
return el.css('top', ( useRelative ) ? relval : fromTop + screenHeight - thisHeight );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue