vue-agile
vue-agile copied to clipboard
Slide action on desktop (@click)
Hi everyone, a little help needed. Don't exactly know if it's a bug or just my lack of understanding.
Describe the problem On desktop specifically, when the user swipes between slides, the mouse click (or mouseup) is triggered, whereas on mobile the behavior is as expected (just swipes and no click registered).
In the codepen below i register a method with a simple console log to demonstrate the problem. Switching between desktop and mobile (in chrome DevTools) shows the difference.
Code https://codepen.io/tkat-the-decoder/pen/abvWXBY
Expected behavior The mouse event (click in this case) should register only when the slides are not transitioning (like in mobile).
It should work exactly how you expect it. I checked quickly your CodePen in Chrome 81.0.4044.122 (Mac) and there is no console.log() when I change slide by swipe. But later today I'll check it deeply, because in version 1.1.x I changed the way how carousel reacts to mouse/touch actions, because some users use it for forms, and before version 1.1 there was to possibilities to interact with inputs, etc.
Sorry. Forgot to mention platform and browsers.
The platform is Windows 10 (v. 1909), and the behavior is identical on Chrome 81.0.4044.122 and Firefox 75 (both 64bit).
... and somehow I closed the issue. Sorry
@tkat Could you check you have the same problem with version from this brunch? I made some changes for mouse events here:
yarn add https://github.com/lukaszflorczak/vue-agile.git/#issue-141-Chrome_Intervention_Unable_to_preventDefault_inside_passive_event_listener_due_to_target_being_treated_as_passive
It appears that Firefox is working now as expected (v.75 , Windows 10, x64).
Chrome is exactly as it was (v.81.0.4044.122 - almost immediately after starting dragging, the event is fired).
Thanks a ton for the quick feedback.
Ok, thank you for feedback. I'll look for a solution. I hope I'll notify you soon about that.
Hi, any update about this issue? :(