It has happened before!
It so happens I have run face-to-face with bears on hiking trails and road side again and again. You really need to know what to do in case.
If you plan to hike in Teton and YS, carrying a bear bell on your backpack is a good idea.