If your item has mending, and you take an item that has cooked out of a furnace (smoker, blast furnace) it will give you experience, and if your mending item is located in the main hand, it will show that the item has gained the experience with the furnace menu still up. However, if it is located opposite of the main hand, it will not gain that experience until the furnace menu is closed.
Linked issues
Comments 2
This is a duplicate of MC-152526.
related to MC-152526