Automatically select first leaf when clicking on a group