Skip to content

Commit

Permalink
Fix mobile event listener type
Browse files Browse the repository at this point in the history
  • Loading branch information
IGPenguin committed Nov 22, 2022
1 parent ea9d4c6 commit 06a05c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/random_quote.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ function registerClickListeners(){
//Needed beacause onTouchEnd is used for mobile vibrations instead of onclick
var eventType;
if (navigator.userAgentData.mobile){
eventType = "touchEnd";
eventType = 'touchend';
} else {
eventType = "click";
eventType = 'click';
}
document.getElementById('button_previous').addEventListener(eventType, previousItem);
document.getElementById('button').addEventListener(eventType, randomItem);
Expand Down

0 comments on commit 06a05c2

Please sign in to comment.