unclickable inputs in sortables (and workaround)
by kae verens on Sep.28, 2009, under javascript, jquery, programming, web development
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();
});
September 28th, 2009 on 3:52 pm
Already looking forward to KFM2
Keep up the good work!
//Mickster
September 28th, 2009 on 3:53 pm
Sorry, left my comment to the wrong post… Where’s my coffee?!