From 10d4552e2766252448973ca58f8f7e8f7bb01673 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Sun, 22 Jan 2017 12:23:33 +0000 Subject: [PATCH] fix move #70 Former-commit-id: d8f0dc20a4c968d9ef17d6bf6cef25f5a35c76a3 --- _embed/public/js/listing.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/_embed/public/js/listing.js b/_embed/public/js/listing.js index 28f3a289..07779d76 100644 --- a/_embed/public/js/listing.js +++ b/_embed/public/js/listing.js @@ -447,8 +447,9 @@ listing.moveSelected = function (event) { let fileElement = document.getElementById(file), destFolder = event.target.querySelector("p code").innerHTML; - if(event.srcElement.querySelector("li[aria-selected=true]") != null) - destFolder = event.srcElement.querySelector("li[aria-selected=true]").innerHTML; + if(event.currentTarget.querySelector("li[aria-selected=true]") != null) { + destFolder = event.currentTarget.querySelector("li[aria-selected=true]").dataset.url; + } let destPath = "/" + destFolder + "/" + fileElement.querySelector(".name").innerHTML; destPath = destPath.replace('//', '/');