Sets the current focusable group if the given value is different from current value. If the current focus item exists, it will be blurred. And then, finds a proper next focus item and focuses it. If there was a previously focused item in the new group, it will be next focus item. Otherwise searches for a initial focus item from the new group and then uses it to next focus item.
(static) setGroup(depth) → {caph.focus.focusController}
Parameters:
Name | Type | Description |
---|---|---|
depth |
string | A string to be set. |
Returns:
Example
angular.module('myApp', ['caph.focus']).controller('myController', ['$scope', 'focusController', function($scope, focusController) {
$scope.changeGroup = function(group) {
focusController.setGroup(group);
}
}]);