vue-agile icon indicating copy to clipboard operation
vue-agile copied to clipboard

Slide action on desktop (@click)

Open tkat opened this issue 4 years ago • 7 comments

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).

tkat avatar Apr 27 '20 09:04 tkat

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.

lukaszflorczak avatar Apr 27 '20 10:04 lukaszflorczak

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).

tkat avatar Apr 27 '20 10:04 tkat

... and somehow I closed the issue. Sorry

tkat avatar Apr 27 '20 10:04 tkat

@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

lukaszflorczak avatar Apr 27 '20 12:04 lukaszflorczak

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.

tkat avatar Apr 27 '20 12:04 tkat

Ok, thank you for feedback. I'll look for a solution. I hope I'll notify you soon about that.

lukaszflorczak avatar Apr 27 '20 12:04 lukaszflorczak

Hi, any update about this issue? :(

Thyoity avatar Jul 01 '20 18:07 Thyoity