fix #67 - Double click on mobile on move dialog

pull/144/head
Henrique Dias 2017-02-04 11:13:27 +00:00
parent 992a763c56
commit 25e6c3c361
1 changed files with 14 additions and 1 deletions

View File

@ -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;
}