WebUI: fix wrong event property

This commit is contained in:
Chocobo1 2024-11-25 23:12:34 +08:00
parent 2109e13746
commit 24d349ffba
No known key found for this signature in database
GPG key ID: 210D9C873253A68C

View file

@ -160,7 +160,7 @@ window.qBittorrent.ContextMenu ??= (() => {
this.touchStartAt = null;
this.touchStartEvent = null;
const isTargetUnchanged = (Math.abs(e.event.pageX - touchStartEvent.event.pageX) <= 10) && (Math.abs(e.event.pageY - touchStartEvent.event.pageY) <= 10);
const isTargetUnchanged = (Math.abs(e.changedTouches[0].pageX - touchStartEvent.changedTouches[0].pageX) <= 10) && (Math.abs(e.changedTouches[0].pageY - touchStartEvent.changedTouches[0].pageY) <= 10);
if (((now - touchStartAt) >= this.options.touchTimer) && isTargetUnchanged)
this.triggerMenu(touchStartEvent, elem);
}, { passive: true });