Community
Participate
Working Groups
This bug introduced by new keybinding traversal in the Navigator.. 1) Next to a file, select "Rename" 2) Type a new name and hit Enter to confirm -> The rename occurs, but it attempts to traverse into the link to the old file name. You end up after the rename on a 404 page.
I think the key event is bubbled up to the parent div. I need to check for bubbled event.
I've got a patch here, better to put it into RC1 if possible. diff --git a/bundles/org.eclipse.orion.client.core/web/orion/explorer-table.js b/bundles/org.eclipse.orion.client.core/web/orion/explorer-table.js index 3cb489f..da0f56a 100644 --- a/bundles/org.eclipse.orion.client.core/web/orion/explorer-table.js +++ b/bundles/org.eclipse.orion.client.core/web/orion/explorer-table.js @@ -237,6 +237,10 @@ var self = this; this.fileClient.fetchChildren(parent.ChildrenLocation).then(function(children) { mUtil.processNavigatorParent(parent, children); + //If a key board navigator is hooked up, we need to sync up the model + if(self.navHandler){ + self.navHandler.refreshModel(self.model); + } dojo.hitch(self.myTree, self.myTree.refreshAndExpand)(parent, children, self.renderer.expandCollapseImageId(self.model.getId(parent)), self.renderer._expandImageClass, self.renderer._collapseImageClass); }); }; diff --git a/bundles/org.eclipse.orion.client.core/web/orion/explorerNavHandler.js b/bundles/org.eclipse.orion.client.core/web/orion/explorerNavHandler.js index dcaf689..5c22449 100644 --- a/bundles/org.eclipse.orion.client.core/web/orion/explorerNavHandler.js +++ b/bundles/org.eclipse.orion.client.core/web/orion/explorerNavHandler.js @@ -51,6 +51,15 @@ var parentDiv = this._getEventListeningDiv(); parentDiv.focus(); var keyListener = dojo.connect(parentDiv, "onkeydown", dojo.hitch(this, function (e) { + if (e.target) {// Firefox, Chrome and Safari + if(e.target !== parentDiv){ + return true; + } + } else if (e.srcElement){// Internet Explorer + if(e.srcElement !== parentDiv){ + return true; + } + } if(this.explorer.preventDefaultFunc && this.explorer.preventDefaultFunc(e, this._modelIterator.cursor())){ return true; } @@ -136,8 +145,6 @@ }, refreshModel: function(model, noReset){ - var parentDiv = this._getEventListeningDiv(); - parentDiv.focus(); this.topIterationNodes = []; this.model = model; if(this.model.getTopIterationNodes){
BTW, there was an existing bug 364725 targeted for 0.5 , which has nothing to do with the fix.
Created attachment 210931 [details] patch file patch
Tested the fix self-hosting on orion.eclipse.org and it looks good.
Just to be clear. The bug has different symptoms depending on where you are. When I tried to rename a file/folder that is in an expanded node in the hierarchy, the rename takes me to some "random" place (another project in the respository). If I do the rename at the root level, it takes me to the "not found."
tested both cases, fix looks good.
fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=d8df538d669ca60a489f0f2df44c666863eadf8a