Behaviour or clearSelection?

View: New views
1 Messages — Rating Filter:   Alert me  

Behaviour or clearSelection?

by Valtonia :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have some code in a tree like this:

<tree id="tree" onselect="showSelection();">

where the showSelection() function populates some input fields with content from the tree.  I also have a 'clear fields' button which calls the tree.view.selection.clearSelection() method, before resetting the input field values.

It all seems to work ok, except that clearSelection appears to trigger the onselect event on the tree, so after clicking the 'clear fields' button I see content from the tree appear and disappear (albeit only briefly).

While this isn't a major issue I would prefer that it not do this - has anyone else seen this behaviour or know of a workaround?

I'm working on OS X 10.5.5 using XULrunner 1.9 (not tried on windows to see if it's just the mac version yet).