Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Closed
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
feat(ngAria[ngClick]): preventDefault on pressing Space so the page d…
…oesn't scroll
  • Loading branch information
stowball committed May 25, 2016
commit 525634076c7d3ba7b460590eb1dbf0bfc3478a31
1 change: 1 addition & 0 deletions src/ngAria/aria.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
elem.on('keypress', function(event) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32

var keyCode = event.which || event.keyCode;
if (keyCode === 32 || keyCode === 13) {
event.preventDefault();
scope.$apply(callback);
}

Expand Down