Fix: scrolling alt text using a mouse #49
1 changed files with 6 additions and 0 deletions
|
@ -170,6 +170,12 @@ onMounted(() => {
|
||||||
pswp.on('change', () => {
|
pswp.on('change', () => {
|
||||||
textBox.textContent = pswp.currSlide?.data.comment;
|
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