Opened 12 years ago

Closed 12 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 davidb)

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)

dojo.data.ItemFileReadStore_20070809.patch (9.9 KB) - added by Jared Jurkiewicz 12 years ago.
dojox.data_20070809.patch (13.3 KB) - added by Jared Jurkiewicz 12 years ago.
dijit.Tree_20070815.patch (452 bytes) - added by Jared Jurkiewicz 12 years ago.

Download all attachments as: .zip

Change History (22)

comment:1 Changed 12 years ago by Adam Peller

Owner: set to bill

comment:2 Changed 12 years ago by bill

Owner: changed from bill to Jared Jurkiewicz

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?

comment:3 Changed 12 years ago by Jared Jurkiewicz

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 12 years ago by Jared Jurkiewicz

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 12 years ago by Jared Jurkiewicz

Changed 12 years ago by Jared Jurkiewicz

Attachment: dojox.data_20070809.patch added

comment:5 Changed 12 years ago by Jared Jurkiewicz

(In [10054]) Updates to handle multiple fetches odduring at dat aload time. refs #4067

comment:6 Changed 12 years ago by Jared Jurkiewicz

(In [10055]) Updates to handle multiple fetches odduring at data load time. refs #4067

comment:7 Changed 12 years ago by Jared Jurkiewicz

Status: newassigned

comment:8 Changed 12 years ago by Jared Jurkiewicz

Resolution: fixed
Status: assignedclosed

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 12 years ago by Jared Jurkiewicz

(In [10057]) Updates to XmlStore? to account for declare syntax change. refs #4067

comment:10 Changed 12 years ago by Jared Jurkiewicz

(In [10059]) Added longer timeout to the paging test, since across webservers it can take a bit longer to run. refs #4067

comment:11 Changed 12 years ago by davidb

Resolution: fixed
Status: closedreopened

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 12 years ago by davidb

Note that this bug does not present when a node is executed via mouse.

comment:13 Changed 12 years ago by davidb

Description: modified (diff)

comment:14 Changed 12 years ago by bill

Component: DijitAccessibility
Milestone: 0.91.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 12 years ago by Jared Jurkiewicz

Owner: changed from Jared Jurkiewicz to bill
Status: reopenednew

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 12 years ago by Jared Jurkiewicz

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 12 years ago by Jared Jurkiewicz

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 12 years ago by Jared Jurkiewicz

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 12 years ago by Jared Jurkiewicz

Attachment: dijit.Tree_20070815.patch added

comment:19 Changed 12 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

(In [10197]) Fixing a minor issue in tree with how it publishes the item. fixes #4067

Note: See TracTickets for help on using tickets.