euvl / vue-js-modal

Easy to use, highly customizable Vue.js modal library.
http://vue-js-modal.yev.io
MIT License
4.35k stars 592 forks source link

Unable to preventDefault inside passive event listener due to target being treated as passive #779

Open mohsennrs opened 1 year ago

mohsennrs commented 1 year ago

I am using the draggable option and when I try to drag the modal in responsive mode I get the error below in the console and the background moves with drag too.

I am using version 2.0.1. I traced the error to the lines below in src/components/Modal.vue file.

document.addEventListener('touchmove', handleDraggableMousemove) document.addEventListener('touchend', handleDraggableMouseup)

I think these listeners should be called with a non-passive flag.

Screenshot from 2022-08-31 15-51-58

I have checked stackoverflow for solutions and 100% sure that this issue is not not related to my code.

szwss commented 1 year ago

I have the same problem