mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-20 16:00:31 +00:00
Fixed Issue 58 Fixed Headers/Footers Scroll with the document occassionally.
The bug seems to be caused by the fact that code inside show() is triggering a scrollstart event while still in the midst of handling the scrollstop event. This threw off the setting of showAfterScroll causing the currentstate to be stuck at "inline", so no hide/show code is ever triggered after that. - Modified the scrollstart and sccrollstop callbacks to set showAfterScroll prior to calling show()/hide(). - movied the hide() call in scrollstart handler underneath the check for 'overlay'.
This commit is contained in:
parent
92c49bf97e
commit
0a2a82102e
1 changed files with 3 additions and 3 deletions
|
|
@ -94,13 +94,13 @@ $.fixedToolbars = (function(){
|
|||
.bind('scrollstart',function(){
|
||||
if(currentstate == 'overlay'){
|
||||
showAfterScroll = true;
|
||||
$.fixedToolbars.hide(true);
|
||||
}
|
||||
$.fixedToolbars.hide(true);
|
||||
})
|
||||
.bind('scrollstop',function(){
|
||||
if(showAfterScroll){
|
||||
$.fixedToolbars.show();
|
||||
showAfterScroll = false;
|
||||
$.fixedToolbars.show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -182,4 +182,4 @@ $.fixedToolbars = (function(){
|
|||
})();
|
||||
|
||||
|
||||
})(jQuery);
|
||||
})(jQuery);
|
||||
|
|
|
|||
Loading…
Reference in a new issue