I am not that familiar with Dynantree and perhaps this is crude, but what worked for me is replacing
$('#input_place_' + id).show().;
with
$('#input_place_' + id).blur(function(){$(this).focus()}).show().focus();
Handling .blur()
event prevents control from losing focus and using last .focus()
actually sets the focus