From e1683f6743aeb94c536264c0a0e8086dba085c8f Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 14 Jan 2016 14:40:56 -0500 Subject: [PATCH] fix(client) goToParentDir: set current dir --- lib/client.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/client.js b/lib/client.js index 592f719c..9221c6c9 100644 --- a/lib/client.js +++ b/lib/client.js @@ -513,13 +513,26 @@ var Util, DOM, CloudFunc, join; this.goToParentDir = function() { var path = Info.dirPath, + dir = Info.dir, parentPath = Info.parentDirPath; if (path !== parentPath) { path = parentPath; CloudCmd.loadDir({ - path: path + path: path, + }, function() { + var current, + panel = Info.panel; + + current = DOM.getCurrentByName(dir); + + if (!current) + current = DOM.getFiles(panel)[0]; + + DOM.setCurrentFile(current, { + history: history + }); }); } };