From b8206b882465ec26086c52dfd3b16a98a8e8d89f Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 11 Dec 2015 13:10:47 -0800 Subject: [PATCH] [Browse] Ensure selection at startup ...even when domain object identified by default path is not found. --- platform/commonUI/browse/src/BrowseController.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/commonUI/browse/src/BrowseController.js b/platform/commonUI/browse/src/BrowseController.js index 243ce16e5b..e6c73b8af4 100644 --- a/platform/commonUI/browse/src/BrowseController.js +++ b/platform/commonUI/browse/src/BrowseController.js @@ -123,6 +123,12 @@ define( } else { doNavigate(nextObject, index + 1); } + } else if (index === 1 && c.length > 0) { + // Roots are in a top-level container that we don't + // want to be selected, so if we couldn't find an + // object at the path we wanted, at least select + // one of its children. + navigateTo(c[c.length - 1]); } else { // Couldn't find the next element of the path // so navigate to the last path object we did find