Choices-js / Choices

A vanilla JS customisable select box/text input plugin ⚡️
https://choices-js.github.io/Choices/
MIT License
6.13k stars 605 forks source link

The item's selection event is not triggered with SwiperJS #886

Open nasatome opened 4 years ago

nasatome commented 4 years ago

Describe the bug By adding choice along with the SwiperJS library, and clicking on the item with the mouse, the item's selection event is not triggered, so it remains null, this does not happen with the use of the keyboard, pressing the Enter key if it works correctly, also works well with the touch in Android Chrome 83 and Safari IOS 13

They probably have the same problem: https://github.com/jshjohnson/Choices/issues/581 https://github.com/jshjohnson/Choices/issues/862

To Reproduce Steps to reproduce the behavior: 1.- Adding the SwiperJS library in Full Screen Vertical 2.- Initialize ChoicesJS with the basic parameters. 3.- click on the selector, and select an item 4.- you will see that it does not click, however if you move the keyboard, and press enter, if you select it

Live Example: https://stackblitz.com/edit/swiper-demo-9-vertical-slider-nbibvn

d1jnPp.th.gif

Expected behavior to click with the mouse and trigger choice selection

Screenshots Live Example: https://stackblitz.com/edit/swiper-demo-9-vertical-slider-nbibvn

Desktop (please complete the following information):

nasatome commented 4 years ago

Problem "pre-resolved" with "simulateTouch: false" option in swiperjs, if you don't use this ability disabling it works, but even so, I can't scroll over the elements (options items), since swiperjs scrolling works, this doesn't happen using "Select2 JS", since observing a bit, Select2 inserts the dropdown items in absolute position via javascript and positions them with "css top and left"

roma77 commented 9 months ago

Problem "Resolved" - simulateTouch: true, touchStartPreventDefault: false,