Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

prevent default on keypress events

  • Loading branch information...
commit 2debb31bb1f2d883298b22d775556cc89155ea0a 1 parent 1838971
@jaipandya authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 js/beatbar.js
View
9 js/beatbar.js
@@ -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();
});
});
Please sign in to comment.
Something went wrong with that request. Please try again.