Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ngSmoothScroll",
"version": "2.0.0",
"homepage": "https://github.com/d-oliveros/ngSmoothScroll",
"version": "2.0.1",
"homepage": "https://github.com/CJSCommonPlatform/ngSmoothScroll",
"authors": [
"David Oliveros <[email protected]>"
],
Expand Down
3 changes: 3 additions & 0 deletions lib/angular-smooth-scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@
targetElement = document.getElementById($attrs.scrollTo);
if ( !targetElement ) return;

// for accessibility purposes the element that we are scrolling to must get the focus
targetElement.focus();

var callbackBefore = function(element) {
if ( $attrs.callbackBefore ) {
var exprHandler = $scope.callbackBefore({element: element});
Expand Down