1👍
✅
This is probably caused because you use the element.name
in the input field and as the key for vue-draggable. Since vue is keeping track of DOM-elements by its key in a v-for loop, I think changing the name will make vue to delete the DOM element and create a new one, with the new key as identifier. That is why it looks like the input is loosing focus, while it actually is another input element.
Changing item-key="name"
to another unique property of the widget object, like title or id, will solve the problem. Since you did not provide the widgets array, I cannot be clear on what would be a usable property.
👤Gabe
Source:stackexchange.com