Detect selected item in navigation tree