diff --git a/static/js/folders.js b/static/js/folders.js index f2ce140..4e3bc82 100644 --- a/static/js/folders.js +++ b/static/js/folders.js @@ -14,7 +14,9 @@ oml.ui.folders = function() { overflowX: 'hidden', }) .bindEvent({ - oml_find: selectList, + oml_find: function() { + selectList(false); + }, oml_showfolder: function() { oml.resizeListFolders(); } @@ -51,7 +53,7 @@ oml.ui.folders = function() { }); } - function selectList() { + function selectList(gainFocus) { var split = ui._list.split(':'), index = userIndex[split[0]], list = split[1], @@ -60,7 +62,8 @@ oml.ui.folders = function() { : oml.$ui.folderList[index]; $lists.forEach(function($list) { if ($list == $selectedList) { - $list.options({selected: [ui._list]}).gainFocus(); + $list.options({selected: [ui._list]}); + gainFocus && $list.gainFocus(); } else { $list.options({selected: []}) } @@ -259,7 +262,7 @@ oml.ui.folders = function() { }); oml.resizeListFolders(); // FIXME: DOESN'T WORK - selectList(); + selectList(true); });