From 8667beb123525753068b19d29807675f55155d0b Mon Sep 17 00:00:00 2001 From: Rolux Date: Fri, 8 Jan 2016 10:14:12 +0530 Subject: [PATCH] when browser selection changes, only set ui.item if in item view (avoids weird flip-to-item behaviour when changing lists) --- static/js/browser.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/static/js/browser.js b/static/js/browser.js index a5f1127..7c4a07a 100644 --- a/static/js/browser.js +++ b/static/js/browser.js @@ -88,11 +88,13 @@ oml.ui.browser = function() { } }, select: function(data) { - oml.UI.set({ - item: data.ids[0], - itemView: 'info', - listSelection: data.ids - }); + if (ui.item) { + oml.UI.set({ + item: data.ids[0], + itemView: 'info', + listSelection: data.ids + }); + } }, oml_find: function() { that.reloadList();