|
|
@ -298,11 +298,9 @@ $.fn.sidebar = function(parameters) { |
|
|
|
} |
|
|
|
else { |
|
|
|
if(module.is.mobile()) { |
|
|
|
requestAnimationFrame(function() { |
|
|
|
$module.scrollTop(0); |
|
|
|
currentScroll = $(window).scrollTop(); |
|
|
|
window.scrollTo(0, 0); |
|
|
|
}); |
|
|
|
$module.scrollTop(0); |
|
|
|
currentScroll = $(window).scrollTop(); |
|
|
|
window.scrollTo(0, 0); |
|
|
|
} |
|
|
|
module.remove.allVisible(); |
|
|
|
requestAnimationFrame(transition); |
|
|
@ -323,24 +321,27 @@ $.fn.sidebar = function(parameters) { |
|
|
|
; |
|
|
|
module.verbose('Removing context push state', module.get.direction()); |
|
|
|
module.unbind.clickaway(); |
|
|
|
|
|
|
|
$transition |
|
|
|
.on(transitionEnd, function(event) { |
|
|
|
if( event.target == $transition[0] ) { |
|
|
|
if(module.is.mobile()) { |
|
|
|
window.scrollTo(0, currentScroll); |
|
|
|
} |
|
|
|
$transition.off(transitionEnd); |
|
|
|
module.remove.transition(); |
|
|
|
module.remove.direction(); |
|
|
|
module.remove.outward(); |
|
|
|
module.remove.visible(); |
|
|
|
if(module.is.mobile() && settings.returnScroll) { |
|
|
|
window.scrollTo(0, currentScroll); |
|
|
|
} |
|
|
|
$.proxy(callback, element)(); |
|
|
|
} |
|
|
|
}) |
|
|
|
; |
|
|
|
module.set.outward(); |
|
|
|
module.remove.active(); |
|
|
|
module.remove.pushed(); |
|
|
|
requestAnimationFrame(function() { |
|
|
|
module.set.outward(); |
|
|
|
module.remove.active(); |
|
|
|
module.remove.pushed(); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
set: { |
|
|
@ -669,6 +670,7 @@ $.fn.sidebar.settings = { |
|
|
|
exclusive : true, |
|
|
|
|
|
|
|
scrollLock : false, |
|
|
|
returnScroll : false, |
|
|
|
|
|
|
|
onChange : function(){}, |
|
|
|
onShow : function(){}, |
|
|
|