diff --git a/src/index.js b/src/index.js index a60925c..8628d77 100644 --- a/src/index.js +++ b/src/index.js @@ -97,9 +97,9 @@ export default class Driver { // Issue: https://github.com/kamranahmedse/driver.js/issues/150 if (!('ontouchstart' in document.documentElement)) { this.window.addEventListener('click', this.onClick, false); + } else { + this.window.addEventListener('touchstart', this.onClick, false); } - - this.window.addEventListener('touchstart', this.onClick, false); } /**