PDA

View Full Version : TreePanel selectPath "stealing" focus from text field



oregontarheel
13 Jul 2007, 10:38 AM
Okay so this is a pretty specific issue, so I'll be amazed if someone can help me here.

In my app I have an object on a time out that polls for changes, and if necessary, updates a (small) tree. I am rebuilding the tree, and then re-selecting the node that should be currently selected. When this happens if someone is typing in a text field, the selectPath function, probably more specifically the node.select function "steals" the focus from that text area, and they might continue typing to no avail. So is there any way to select the node without actually firing some sort of focus change event in the browser? I imagine it's possible as it's just a different css class really.

Thanks!

oregontarheel
13 Jul 2007, 10:57 AM
I got around this problem by just setting the css class manually, and also setting the selected node manually. Not sure what else is happening inside that function that causes this issue. Talking through your problem is a great way to figure out how to solve it!