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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -