Runroom / runroom-packages

Runroom packages for Symfony development
MIT License
5 stars 5 forks source link

[Sortable] `.disableSelection()` is deprecated #149

Open mvhirsch opened 1 year ago

mvhirsch commented 1 year ago

On my version of jquery-ui (I'm using v1.13.2) it doesn't even exist and leads to an error, rendering the drag-and-drop unusable.

See https://api.jqueryui.com/disableselection/

jordisala1991 commented 1 year ago

Do you want or know how to fix the deprecated code?

mvhirsch commented 1 year ago

I'm using v0.16.1, because of an old php version. I copied the file and removed that method call: https://github.com/Runroom/runroom-packages/blob/1a06177109b2bb50b8798bf89157ec39eb915bbc/packages/sortable-behavior-bundle/src/Resources/public/js/init.js#L74

This works on my system now, but in theory allows selection of elements. That can be disabled using CSS (if I remember correctly).

I could provide a PR, but are unable to test it atm on modern versions (PHP 8 / runroom-packages/sortable-behavior-bundle 0.17.1).