From 29086fc783d7641d2d6c2ea6aac83d7df440ee81 Mon Sep 17 00:00:00 2001 From: benonymity Date: Fri, 22 Dec 2023 22:34:24 -0500 Subject: [PATCH 1/2] fix: no swipeback when audio player fullscreen --- components/app/AudioPlayer.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/app/AudioPlayer.vue b/components/app/AudioPlayer.vue index 3bd04383..96ceb08f 100644 --- a/components/app/AudioPlayer.vue +++ b/components/app/AudioPlayer.vue @@ -632,6 +632,10 @@ export default { }, touchstart(e) { if (!this.showFullscreen || !e.changedTouches) return + if (e.pageX < 20) { + e.preventDefault() + e.stopImmediatePropagation() + } this.touchStartY = e.changedTouches[0].screenY if (this.touchStartY > window.innerHeight / 3) { @@ -848,7 +852,7 @@ export default { window.addEventListener('resize', this.screenOrientationChange) this.$eventBus.$on('minimize-player', this.minimizePlayerEvt) - document.body.addEventListener('touchstart', this.touchstart) + document.body.addEventListener('touchstart', this.touchstart, {passive: false}) document.body.addEventListener('touchend', this.touchend) document.body.addEventListener('touchmove', this.touchmove) this.$nextTick(this.init) From 98a465c7b4013a88f95213cd8c6f17af8b029817 Mon Sep 17 00:00:00 2001 From: advplyr Date: Mon, 1 Jan 2024 10:51:46 -0600 Subject: [PATCH 2/2] Update components/app/AudioPlayer.vue --- components/app/AudioPlayer.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/app/AudioPlayer.vue b/components/app/AudioPlayer.vue index 61c31195..caac1e39 100644 --- a/components/app/AudioPlayer.vue +++ b/components/app/AudioPlayer.vue @@ -860,7 +860,7 @@ export default { window.addEventListener('resize', this.screenOrientationChange) this.$eventBus.$on('minimize-player', this.minimizePlayerEvt) - document.body.addEventListener('touchstart', this.touchstart, {passive: false}) + document.body.addEventListener('touchstart', this.touchstart, { passive: false }) document.body.addEventListener('touchend', this.touchend) document.body.addEventListener('touchmove', this.touchmove) this.$nextTick(this.init)