mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
Deleting somes unused parts from last commit
This commit is contained in:
parent
3cac2c4ee5
commit
38d87adbc0
1 changed files with 1 additions and 25 deletions
|
@ -374,27 +374,3 @@ function tweak_portal_when_in_iframe()
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
var lastY = 0; // Needed in order to determine direction of scroll.
|
||||
$(".scroll-container").on('touchstart', function(event) {
|
||||
lastY = event.touches[0].clientY;
|
||||
});
|
||||
|
||||
$('.scroller').on('touchmove', function(event) {
|
||||
var top = event.touches[0].clientY;
|
||||
|
||||
// Determine scroll position and direction.
|
||||
var scrollTop = $(event.currentTarget).scrollTop();
|
||||
var direction = (lastY - top) < 0 ? "up" : "down";
|
||||
|
||||
// FIX IT!
|
||||
if (scrollTop == 0 && direction == "up") {
|
||||
// Prevent scrolling up when already at top as this introduces a freeze.
|
||||
event.preventDefault();
|
||||
} else if (scrollTop >= (event.currentTarget.scrollHeight - event.currentTarget.outerHeight()) && direction == "down") {
|
||||
// Prevent scrolling down when already at bottom as this also introduces a freeze.
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
lastY = top;
|
||||
});
|
Loading…
Reference in a new issue