From 999fefa0e5093984e3937faa234f6254eead7354 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 10 Sep 2014 03:29:46 -0400 Subject: [PATCH] fix(menu) download: toggle selection of file only if file was selected --- lib/client/menu.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/client/menu.js b/lib/client/menu.js index d129df60..a4fb768c 100644 --- a/lib/client/menu.js +++ b/lib/client/menu.js @@ -239,6 +239,7 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO; files.forEach(function(file) { var element, + selected = DOM.isSelected(file), path = DOM.getCurrentPath(file), id = DOM.load.getIdBySrc(path), isDir = DOM.isCurrentIsDir(file), @@ -260,7 +261,8 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO; document.body.removeChild(element); }, TIME); - DOM.toggleSelectedFile(file); + if (selected) + DOM.toggleSelectedFile(file); }); }