If I do “jquery sortable” on a contenteditable item(s), I then can't focus mouse anywhere inside contenteditable text anymore

后端 未结 7 2407
情深已故
情深已故 2021-02-07 05:31

Strangely this is broken only in Firefox and Opera (IE, Chrome and Safari works as it should).

Any suggestions for a quick fix?




        
7条回答
  •  我寻月下人不归
    2021-02-07 05:49

    I have found another "solution" to this problem.

    When declaring your sortable, you should add a cancel: option like this:

    
    
      
      
      
    
    
      
        

    One apple

    Two pears

    Three oranges

    This version does not force your cursor at the start, but you also can't drag using this field. I'd advice wrapping the

    in a container which has some sort of dragging handle (like the dots at the start of every row in gmail).

    side remark: ':input,button' is required, because that is the default option. If you do not add these, you get similar problems with inputfields and buttons.

提交回复
热议问题