clicking on elements will select them in the tree