Reset cursor position after root text tags