| Summary: | Renaming a file attempts to traverse into it | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | John Arthorne <john.arthorne> | ||||
| Component: | Client | Assignee: | libing wang <libingw> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | ken_walker, susan | ||||
| Version: | 0.4 | Flags: | john.arthorne:
review+
|
||||
| Target Milestone: | 0.4 RC1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
John Arthorne
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. |