fixed tree editing bug when just losing focus.