Focus handling for AngularJS