javascript - focus is not working after the blur event to the textbox in jquery -
while dragging div, need remove focus of input , on dropping it, add focus. have enclosed code here.
$('.ui-draggable').mousedown(function(){ $(this).find('input').blur(); $(this).addclass('draggable'); }).mouseup(function(){ $('.draggable').find('input').focus(); $(this).removeclass('draggable'); });
i don't think need call 'blur', input lose focus when click ui-draggable element. should use stop-event of draggable.
$('.ui-draggable').on( "dragstop", function( event, ui ) { $('yourinputselector').focus(); });
Comments
Post a Comment