How to get baby to stop pulling off of nipple?

Veronica

My 6 month old recently started pulling off of my nipple without unlatching herself first. This is obviously causing me a lot of pain and milk blebs.

Is there any way I can teach her to stop doing this? She's very distractable and will twist her head around to look at anything that catches her eye, taking my nipple with her until it pops out of her mouth.