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:
Kin Blas 2010-09-24 10:50:25 -07:00
parent 92c49bf97e
commit 0a2a82102e

View file

@ -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);