Bug 420727 - Blank left pane in editor
diff --git a/bundles/org.eclipse.orion.client.ui/web/edit/setup.js b/bundles/org.eclipse.orion.client.ui/web/edit/setup.js
index 0001d33..860736e 100644
--- a/bundles/org.eclipse.orion.client.ui/web/edit/setup.js
+++ b/bundles/org.eclipse.orion.client.ui/web/edit/setup.js
@@ -208,12 +208,6 @@
 	function SidebarNavInputManager() {
 		EventTarget.attach(this);
 	}
-	SidebarNavInputManager.prototype.processHash = function() {
-		var navigate = PageUtil.matchResourceParameters().navigate;
-		if (typeof navigate === "string" && this.setInput) { //$NON-NLS-0$
-			this.setInput(navigate);
-		}
-	};
 
 	var sidebarNavInputManager = new SidebarNavInputManager();
 	var sidebar = new Sidebar({
@@ -229,6 +223,12 @@
 		sidebarNavInputManager: sidebarNavInputManager,
 		toolbar: sidebarToolbar
 	});
+	SidebarNavInputManager.prototype.processHash = function() {
+		var navigate = PageUtil.matchResourceParameters().navigate;
+		if (typeof navigate === "string" && this.setInput && sidebar.getActiveViewModeId() === "nav") { //$NON-NLS-1$ //$NON-NLS-0$
+			this.setInput(navigate);
+		}
+	};
 	sidebar.show();
 	sidebarNavInputManager.addEventListener("rootChanged", function(evt) { //$NON-NLS-0$
 		lastRoot = evt.root;
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/PageUtil.js b/bundles/org.eclipse.orion.client.ui/web/orion/PageUtil.js
index 5d122cf..a1d9eee 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/PageUtil.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/PageUtil.js
@@ -27,7 +27,6 @@
 			var text = optURIText.substring(hashIndex + 1);

 			if (text.length !== 0) {

 				var params = text.split(","); //$NON-NLS-0$

-				Object.defineProperty(result, "resourceRaw", {value: params[0]});

 				result.resource = decodeURIComponent(params[0]);

 				for (var i = 1; i < params.length; i++) {

 					//We can not use params[i].split("=") here because a param's value may contain "=", which is not encoded.

diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/sidebar.js b/bundles/org.eclipse.orion.client.ui/web/orion/sidebar.js
index 8104855..1c993b1 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/sidebar.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/sidebar.js
@@ -1,10 +1,15 @@
 /*global console define*/
 /*jslint browser:true sub:true*/
 define(['orion/Deferred', 'orion/objects', 'orion/commands', 'orion/outliner', 'orion/webui/littlelib',
+		'orion/URITemplate',
+		'orion/PageUtil',
 		'orion/widgets/nav/mini-nav',
 		'orion/widgets/nav/project-nav',
 		'i18n!orion/edit/nls/messages'],
-		function(Deferred, objects, mCommands, mOutliner, lib, MiniNavViewMode, ProjectNavViewMode, messages) {
+		function(Deferred, objects, mCommands, mOutliner, lib, URITemplate, PageUtil, MiniNavViewMode, ProjectNavViewMode, messages) {
+
+	var uriTemplate = new URITemplate("#{,resource,params*}"); //$NON-NLS-0$
+
 	/**
 	 * @name orion.sidebar.Sidebar
 	 * @class Sidebar that appears alongside an {@link orion.editor.Editor} in the Orion IDE.
@@ -108,7 +113,14 @@
 					sidebarNavInputManager: this.sidebarNavInputManager,
 					serviceRegistry: serviceRegistry,
 					toolbarNode: modeContributionToolbar,
-					scopeUp: function(){_self.setViewMode("nav");}
+					scopeUp: function(){
+						var input = PageUtil.matchResourceParameters();
+						var resource = input.resource;
+						delete input.navigate;
+						delete input.resource;
+						window.location.href = uriTemplate.expand({resource: resource, params: input});
+						_self.setViewMode("nav");
+					}
 				});
 				if(this.editorInputManager.getFileMetadata()){
 					this.addViewMode("project", projectViewMode);
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/nav/mini-nav.js b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/nav/mini-nav.js
index 2e1a0cb..cdb22ff 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/nav/mini-nav.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/nav/mini-nav.js
@@ -492,14 +492,12 @@
 
 			var params = PageUtil.matchResourceParameters();
 			var navigate = params.navigate, resource = params.resource;
-			if (!navigate) {
-				var root = this.lastRoot || this.fileClient.fileServiceRootURL(resource || ""); //$NON-NLS-0$
-				this.explorer.loadRoot(root).then(function(){
-					if (!_self.explorer) { return; }
-					_self.explorer.updateCommands();
-					_self.explorer.reveal(_self.editorInputManager.getFileMetadata(), true);
-				});
-			}
+			var root = params.navigate || this.lastRoot || this.fileClient.fileServiceRootURL(resource || ""); //$NON-NLS-0$
+			this.explorer.loadRoot(root).then(function(){
+				if (!_self.explorer) { return; }
+				_self.explorer.updateCommands();
+				_self.explorer.reveal(_self.editorInputManager.getFileMetadata(), true);
+			});
 		},
 		destroy: function() {
 			if (this.explorer) {