You are not able to interact with the 'name bar' on the top of the anvils interface, therefore you can't name items.
When I was about to name an item in an anvil I noticed that I couldn't click on the name bar. I after that tried to do it in different game modes and worlds but the result was always that I couldn't interact with the bar.
⚠️ Please do not mark issues as private, unless your bug report is an exploit or contains information about your username or server.
Thank you for your report!
We're actually already tracking this issue in MC-173725, so I've resolved and linked this ticket as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki