mirror of
https://github.com/paricafe/misskey.git
synced 2024-12-27 00:06:44 -06:00
Fix scrolling alt text using a mouse
Co-authored-by: BlankEclair <blankeclair@disroot.org>
This commit is contained in:
parent
2c4fc485e4
commit
8496e0af97
1 changed files with 6 additions and 0 deletions
|
@ -173,6 +173,12 @@ onMounted(() => {
|
|||
pswp.on('change', () => {
|
||||
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');
|
||||
},
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue