From 25e6c3c361611cfd5ef7f203ecf6c8fb87932d02 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Sat, 4 Feb 2017 11:13:27 +0000 Subject: [PATCH] fix #67 - Double click on mobile on move dialog --- _embed/public/js/listing.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/_embed/public/js/listing.js b/_embed/public/js/listing.js index 07779d76..d1f339bf 100644 --- a/_embed/public/js/listing.js +++ b/_embed/public/js/listing.js @@ -389,7 +389,8 @@ listing.getJSON = function (link) { } listing.moveMakeItem = function (url, name) { - let node = document.createElement("li"); + let node = document.createElement("li"), + count = 0; node.dataset.url = url; node.innerHTML = name; @@ -397,6 +398,18 @@ listing.moveMakeItem = function (url, name) { node.addEventListener("dblclick", listing.moveDialogNext); node.addEventListener("click", listing.selectMoveFolder); + node.addEventListener('touchstart', event => { + count++; + + setTimeout(() => { + count = 0; + }, 300) + + if(count > 1) { + listing.moveDialogNext(event); + } + }); + return node; }