Opened 14 years ago
Closed 14 years ago
#4067 closed defect (fixed)
Pressing enter key on a tree node fires execute but also an exception
Reported by: | davidb | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.0 |
Component: | Accessibility | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
Looking at the nightlies, I think this was introduced in [9996].
Note that there is no exception when using the mouse to execute nodes.
Attachments (3)
Change History (22)
comment:1 Changed 14 years ago by
Owner: | set to bill |
---|
comment:2 Changed 14 years ago by
Owner: | changed from bill to Jared Jurkiewicz |
---|
comment:3 Changed 14 years ago by
The problem stems from the single store access and two fetches both triggering a simultaneous load (since the xhrGet is async). What needs to happen is that the first fetch requets needs to be the only data loader and the subsequent fetch requests are queued up while the first is going on; then they are executed when the first finishes.
Working on a patch for this issue for the datastore...
comment:4 Changed 14 years ago by
Fixed ItemFileStore? and such. Working on the stores in dojox, like CsvStore?. Having issues on IE that I don't understand. Something strange is going on. Will hopefully have a fix for all stores tomorrow sometime. IE is such a pain.
Changed 14 years ago by
Attachment: | dojo.data.ItemFileReadStore_20070809.patch added |
---|
Changed 14 years ago by
Attachment: | dojox.data_20070809.patch added |
---|
comment:5 Changed 14 years ago by
comment:6 Changed 14 years ago by
comment:7 Changed 14 years ago by
Status: | new → assigned |
---|
comment:8 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Tested changes on:
Firefox 2.0.0.5 Firefox 1.5.0.12 IE 6 IE 7 Safari B3 Seamonkey 1.1.2
comment:9 Changed 14 years ago by
comment:10 Changed 14 years ago by
comment:11 Changed 14 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Thanks for your work jaredj, unfortunately this bug is still presenting for me in the nightly build. http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/test_Tree.html (Tested using FF 2.0.0.6)
comment:12 Changed 14 years ago by
Note that this bug does not present when a node is executed via mouse.
comment:13 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:14 Changed 14 years ago by
Component: | Dijit → Accessibility |
---|---|
Milestone: | 0.9 → 1.0 |
If it's only enter key then it's not a dojo.data problem. But I can't reproduce. Which browser? Which OS? Which tree? Any node in the tree?
comment:15 Changed 14 years ago by
Owner: | changed from Jared Jurkiewicz to bill |
---|---|
Status: | reopened → new |
Reassigning to bill, as the issue with dojo.data has been fixed. Any other exceptions would not be related to dojo.data
comment:16 Changed 14 years ago by
And double-checking what is being passed into the ItemFileReadStore? when enter is hit. Something funny is definitely going on with what is being passed to the store. Wondering if there is some static sharing going on between the two trees.
comment:17 Changed 14 years ago by
Yes, the tree is definitely passing something odd with the top tree when enter is hit/ See:
When mouse clicked: Item attr: [name] has value: [Africa] Item attr: [type] has value: [continent] Item attr: [children] has value: object Object],[object Object],[object Object? Item attr: [_RI] has value: [true] Item attr: [_S] has value: object Object? Item attr: [_0] has value: [0] execute message for [dijit._TreeNode, Africa]
When enter is pressed: Null or undefined item! item is: undefined [Exception... "'Error: dojo.data.ItemFileReadStore?: a function was passed an item argument that was not an item' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]
So, it looks like the top tree is passing an undefined item on pressing enter, which of course will cause ItemFileReadStore? to throw an exception; not a valid item.
Looking a bit further to see where the Tree gets its items.
comment:18 Changed 14 years ago by
Problem is in onKeyPress:
}else{ handle non-printables (arrow keys)
if(this._keyTopicMap[e.keyCode]){
this._publish(this._keyTopicMap[e.keyCode], { node: treeNode } ); dojo.stopEvent(e);
}
}
For execute topics, which will cause a store query, it's not passing the item.
Simple fix should be something like:
}else{ handle non-printables (arrow keys)
if(this._keyTopicMap[e.keyCode]){
this._publish(this._keyTopicMap[e.keyCode], { node: treeNode, item: treeNode.item } ); dojo.stopEvent(e);
}
}
Changed 14 years ago by
Attachment: | dijit.Tree_20070815.patch added |
---|
comment:19 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Jared, can you take a look? We are calling continentStore.getLabel(item) but it's complaining that item isn't an item, even though it is. Presumably because it's not from the most recent query against continentStore. (Note that there are two trees both pointing to continentStore.) Should we make two separate stores?