Closed sociojs closed 1 year ago
Vue3 docs:
For the
.passive
,.capture
, and.once
event modifiers, they can be concatenated after the event name using camelCase.
So in the sources of Carousel.ts
we should make an adjustment:
onTouchstartPassiveCapture: config.touchDrag ? handleDragStart : null
Vue3-carousel gives me an impact on site performance
[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive.)
Chrome console:
Lighthouse performance issue:
As far as I search, the solution is to add "{passive: true}" to each addEventListener and removeEventListener, I tried but with no luck. Is there anyone currently fixing this part?
Update: The "Avoid an excessive DOM size" diagnostics warning was my bad (solved). "non-passive event listener....." issues still exist.