Fix#195 - Taps are doubled on touch devices
Browse files- src/index.js +2 -2
src/index.js
CHANGED
@@ -97,9 +97,9 @@ export default class Driver {
|
|
97 |
// Issue: https://github.com/kamranahmedse/driver.js/issues/150
|
98 |
if (!('ontouchstart' in document.documentElement)) {
|
99 |
this.window.addEventListener('click', this.onClick, false);
|
|
|
|
|
100 |
}
|
101 |
-
|
102 |
-
this.window.addEventListener('touchstart', this.onClick, false);
|
103 |
}
|
104 |
|
105 |
/**
|
|
|
97 |
// Issue: https://github.com/kamranahmedse/driver.js/issues/150
|
98 |
if (!('ontouchstart' in document.documentElement)) {
|
99 |
this.window.addEventListener('click', this.onClick, false);
|
100 |
+
} else {
|
101 |
+
this.window.addEventListener('touchstart', this.onClick, false);
|
102 |
}
|
|
|
|
|
103 |
}
|
104 |
|
105 |
/**
|