SortableJS / Sortable

Reorderable drag-and-drop lists for modern browsers and touch devices. No jQuery or framework required.
https://sortablejs.github.io/Sortable/
MIT License
29.77k stars 3.7k forks source link

[bug] Text inputs in a sortable div can no longer be focused #2410

Closed joeybab3 closed 1 day ago

joeybab3 commented 4 days ago

To Reproduce

  1. Click on a form input within a div that is draggable
  2. Focus is immediately removed.
  3. Opening inspect element shows that when the text field is clicked the element becomes draggable.

Expected behavior

In previous versions I was able to click to type in these forms and then drag elsewhere.

This issue is not present in 1.15.3

Information

Versions: sortablejs = @latest(1.15.4)

Reproduction https://jsbin.com/rukomad/1/edit?html,css,output

trcat commented 3 days ago

same problem

trcat commented 3 days ago

i use filter to expect input to fix this problem

arsqu commented 2 days ago

try https://github.com/SortableJS/Sortable/issues/972#issuecomment-280253000 example https://jsbin.com/penizaw/edit?html,css,js,output

owen-m1 commented 2 days ago

Thank you for reporting, this is a byproduct of another fix that was necessary to prevent text from being selected during dragging. Please follow @arsqu's solution for a reliable fix. I will probably change the new behaviour to only occur during fallback to mitigate this problem.

owen-m1 commented 2 days ago

Please try 1.15.5 and let me know if it's working again