Skip to content

Commit

Permalink
Use keydown, not keyup for transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysonvirissimo committed Aug 21, 2022
1 parent 80c4d4e commit 6ed8963
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/lines/read.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</section>
<script>
(function () {
document.body.onkeyup = function(event){
document.body.onkeydown = function(event) {
var spacebar = 32;
if (event.keyCode == spacebar) {
event.preventDefault();
Expand Down
2 changes: 1 addition & 1 deletion app/views/lines/test.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</div>
<script>
(function () {
document.body.onkeyup = function(event){
document.body.onkeydown = function(event){
var spacebar = 32;
if (event.keyCode === spacebar) {
event.preventDefault();
Expand Down

0 comments on commit 6ed8963

Please sign in to comment.