- 🇨🇦Canada mdolnik
This issue is stemming from the logic in this module's
select2.js
file in theif (config.multiple) {
section at the bottom.This logic allows the selected items to be dragged to change the order of the values, but for some reason on mobile when you tap on the close button, it attempts to start dragging the item instead.
Note: I was able to recreate this issue on mobile chrome, but on mobile firefox the button works as expected.
The solution for this is to tell the Sortable functionality that it should avoid dragging when tapping on the close button and this can be done by adding
filter: '.select2-selection__choice__remove'
to the configuration.Added a patch to bring in this change as well as add versioning to the library files to ensure cache is busted.
- 🇫🇮Finland Tuuuukka
#2 seems to fix it, nice work mdolnik.
To keep things simple and just fix the issue that's mentioned in the original post, I'd leave the versioning out of the patch though. The versioning could be done as a separate issue/PR/patch.
- 🇫🇮Finland Tuuuukka
Here's the correct patch file which includes nothing but the JS fix from #2.