Fix attribute dialog crash on close
Set focus to first widget on attribute form