Allow to trigger a focus update

pull/1808/head
Hagen Schink 10 years ago
parent 9acc7ea67a
commit b43dbbf550
  1. 8
      app/assets/javascripts/angular/directives/components/focus.js

@ -57,11 +57,9 @@ angular.module('openproject.uiComponents')
link: function(scope, element, attrs) {
updateFocus(scope, element, attrs);
if (condition) {
$timeout(function() {
element[0].focus();
});
}
scope.$on('updateFocus', function() {
updateFocus(scope, element, attrs);
});
}
};
}]);

Loading…
Cancel
Save