Fix text select bug in tree