Fix long press in FF (#2226)

* Fix long press in FF

* Better fix
This commit is contained in:
Paulus Schoutsen 2018-12-09 10:09:34 +01:00 committed by GitHub
parent 6b9ba7367d
commit 2a23487163
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,7 +110,8 @@ class LongPress extends HTMLElement implements LongPress {
const clickEnd = (ev: Event) => { const clickEnd = (ev: Event) => {
if ( if (
this.cooldownEnd || this.cooldownEnd ||
(ev instanceof TouchEvent && this.timer === undefined) (["touchend", "touchcancel"].includes(ev.type) &&
this.timer === undefined)
) { ) {
return; return;
} }