Permalink
Browse files

prevent default on keypress events

  • Loading branch information...
1 parent 1838971 commit 2debb31bb1f2d883298b22d775556cc89155ea0a @jaipandya committed Apr 29, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 js/beatbar.js
View
@@ -72,7 +72,8 @@
key('p, k', function(){
self.playPrevious();
});
- key('space', function(){
+ key('space', function(e){
+ e.preventDefault();
self.togglePlay();
});
key('right', function(){
@@ -84,10 +85,12 @@
key('home 0', function(){
self.seekToBeginning();
});
- key('up', function(){
+ key('up', function(e){
+ e.preventDefault();
self.increaseVolume();
});
- key('down', function(){
+ key('down', function(e){
+ e.preventDefault();
self.decreaseVolume();
});
});

0 comments on commit 2debb31

Please sign in to comment.