optimize modal dlg.set focus etc.