I can't type to inputs

前端 未结 3 1915
时光说笑
时光说笑 2021-01-12 06:32

I have a list which can be sortable. I\'m using jQuery UI with widget, mouse, position, sortable addons.

CSS:

#sortable{
    width : 550px;
    displ         


        
相关标签:
3条回答
  • 2021-01-12 06:46

    If would like to prevent text selection but continue to use inputs at the same time, you should try this

    $('body *').not(':has(input)').not('input').disableSelection();
    
    0 讨论(0)
  • 2021-01-12 06:49

    Just do:

    $( "#sortable_container_id input").click(function() { $(this).focus(); });
    

    and replace sortable_container_id with the id of the element that is the container of all "sortable" elements.

    0 讨论(0)
  • 2021-01-12 07:09

    This happens because you have $("#sortable").disableSelection();. Remove it and will work ok.

    http://jsfiddle.net/KbBnu/1/

    0 讨论(0)
提交回复
热议问题