improved the fixed headers and footers so they show and hide more appropriately, even when starting a scroll on an anchor element. Fixes #1309

This commit is contained in:
scottjehl 2011-03-29 19:09:19 -04:00
parent f80d286ecb
commit 27b4cd29fc

View file

@ -54,13 +54,12 @@ $.fixedToolbars = (function(){
$(function() {
$(document)
.bind(touchStartEvent,function(event){
.bind( "vmousedown",function(event){
if( touchToggleEnabled ) {
if( $(event.target).closest(ignoreTargets).length ){ return; }
stateBefore = currentstate;
}
})
.bind(touchStopEvent,function(event){
.bind( "vclick",function(event){
if( touchToggleEnabled ) {
if( $(event.target).closest(ignoreTargets).length ){ return; }
if( !scrollTriggered ){
@ -70,7 +69,6 @@ $.fixedToolbars = (function(){
}
})
.bind('scrollstart',function(event){
if( $(event.target).closest(ignoreTargets).length ){ return; } //because it could be a touchmove...
scrollTriggered = true;
if(stateBefore == null){ stateBefore = currentstate; }