mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Disable autoscroll on touchmove
This commit is contained in:
parent
dd5b442b50
commit
a4c88e59eb
1 changed files with 5 additions and 3 deletions
|
@ -241,7 +241,7 @@ export default function (view) {
|
|||
}
|
||||
}
|
||||
|
||||
function onWheel() {
|
||||
function onWheelOrTouchMove() {
|
||||
autoScroll = false;
|
||||
}
|
||||
|
||||
|
@ -255,7 +255,8 @@ export default function (view) {
|
|||
view.addEventListener('viewshow', function () {
|
||||
Events.on(playbackManager, 'playerchange', onPlayerChange);
|
||||
autoScroll = true;
|
||||
document.addEventListener('wheel', onWheel);
|
||||
document.addEventListener('wheel', onWheelOrTouchMove);
|
||||
document.addEventListener('touchmove', onWheelOrTouchMove);
|
||||
document.addEventListener('keydown', onKeyDown);
|
||||
try {
|
||||
onLoad();
|
||||
|
@ -266,7 +267,8 @@ export default function (view) {
|
|||
|
||||
view.addEventListener('viewbeforehide', function () {
|
||||
Events.off(playbackManager, 'playerchange', onPlayerChange);
|
||||
document.removeEventListener('wheel', onWheel);
|
||||
document.removeEventListener('wheel', onWheelOrTouchMove);
|
||||
document.removeEventListener('touchmove', onWheelOrTouchMove);
|
||||
document.removeEventListener('keydown', onKeyDown);
|
||||
releaseCurrentPlayer();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue