'SortableJS with input fields doesn't let me click inside

My real-life case is more complicated, but this is the barebone problem:

https://jsfiddle.net/svhwjatd/

Using SortableJS, if I want to move also input fields, then when I try to click in the input themselves, the cursor appears but always in the first position and I CANNOT use the mouse or the finger to move the cursor at the end, I need to use the cursor keys.

Any workaround to fix this? I tried adding a

onclick="this.scrollLeft = this.scrollWidth;"

to the input element and, while it does something, it's not what I expect.

I would like to have the cursor WHERE I CLICKED or, compromise, at the end of the input string.

Thank you



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source