From 5cc77b64bf63417fb7a70ec2820f7965cb8e779c Mon Sep 17 00:00:00 2001
From: CenTdemeern1 <timo.herngreen@gmail.com>
Date: Tue, 10 Dec 2024 15:12:56 +0100
Subject: [PATCH] Fix scrolling alt text using a mouse

Co-authored-by: BlankEclair <blankeclair@disroot.org>
---
 packages/frontend/src/components/MkMediaList.vue | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/packages/frontend/src/components/MkMediaList.vue b/packages/frontend/src/components/MkMediaList.vue
index 5209489046..11529c186f 100644
--- a/packages/frontend/src/components/MkMediaList.vue
+++ b/packages/frontend/src/components/MkMediaList.vue
@@ -195,6 +195,12 @@ onMounted(() => {
 
 					textBox.textContent = pswp.currSlide?.data.comment;
 				});
+
+				// `passive: true` is for Safari compatibility, apparently
+				const stopEvent = name => textBox.addEventListener(name, event => event.stopPropagation(), { passive: true });
+				stopEvent('wheel');
+				stopEvent('pointerdown');
+				stopEvent('pointercancel');
 			},
 		});
 	});
-- 
GitLab