Added convenient method to find the rect of the selected text