if target is text in a div keep the root at target