unclickable inputs in sortables (and workaround)

Got a call today – a form I created which had some sortable elements was not allowing its contained inputs to be clicked.

After a little investigation, I found this is already reported as a bug.

The workaround is to apply the sortable as usual, using the $().sortable() call, and then after that, override the sortable’s mousedown and click events to force inputs to be selected when they’re clicked.

  $('#form_fields').sortable();
  $('#form_fields input').bind('click.sortable mousedown.sortable',function(ev){
    ev.target.focus();
  });
  1. Already looking forward to KFM2 🙂
    Keep up the good work!

    //Mickster

  2. Sorry, left my comment to the wrong post… Where’s my coffee?! 🙂

Leave a Reply

%d bloggers like this: