From 15b6de3e39a37950e5a1cfb827eab8e10f27546e Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Tue, 11 Feb 2020 01:44:24 +0100 Subject: viewer: fixed an issue on mobile phones; two clicks were required to follow a link --- viewer/src/dragscrollclickfix.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'viewer') diff --git a/viewer/src/dragscrollclickfix.ts b/viewer/src/dragscrollclickfix.ts index 3db0b20..00360fb 100644 --- a/viewer/src/dragscrollclickfix.ts +++ b/viewer/src/dragscrollclickfix.ts @@ -20,7 +20,7 @@ // https://github.com/donmbelembe/vue-dragscroll/issues/61 export default class DragScrollClickFix { - readonly DRAG_DELAY = 100; // This is the minimal delay to consider a click to be a drag, mostly usefull for touch devices + readonly DRAG_DELAY = 250; // This is the minimal delay to consider a click to be a drag, mostly usefull for touch devices timer: NodeJS.Timeout | null = null; dragging: boolean = false; @@ -39,6 +39,7 @@ export default class DragScrollClickFix { clearTimeout(this.timer); this.timer = null; } + setTimeout(() => this.dragging = false); } onClickCapture(e: MouseEvent) { -- cgit v1.2.3