If you have your focus on a Fence (outlines on the fence), you can't eat. Easy to duplicate, fire up any world, survival or creative and go to a Fence.
Note :
The animation that plays instead of eating seems to be the 'Placing' animation.
Related issues
Comments

Duplicate of MC-4582, please use the search function to see if your bug has already been submitted. Currently over 57% of tickets are being resolved as duplicate.