I am using a jquery ui
drag and drop on a li
. In this li
I have a div
and I dynamically adds an input field
, the problem is that after I added my input
I can't write in it. here is my code:
<ul>
<li class="ui-state-default" name="li_transit">
info text <div></div>
</li>
</ul>
$(function(){
$( "#sortable" ).sortable({
revert: true,
cancel: ":input"
});
$( "#draggable" ).draggable({
connectToSortable: "#sortable",
helper: "clone",
revert: "invalid"
});
$( "ul, li" ).disableSelection();
});
I believe disableSelection is stopping you from selecting any inputs inside of the li. Perhaps try commenting that out and seeing if your problem persists.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.