The Bug:
Keyboard-focused villager trades lose their focus when villagers restock.
Before the list of trades was reworked in 26.4 Snapshot 7, focused trades kept their focus when villagers restocked.
Steps to Reproduce:
Place down a composter and summon a farmer villager next to it with an out-of-stock trade by using the commands provided below.
/setblock ~ ~ ~2 minecraft:composter/summon minecraft:villager ~ ~ ~1 {VillagerData:{profession:"minecraft:farmer",level:2},Offers:{Recipes:[{buy:{id:"minecraft:wheat"},sell:{id:"minecraft:emerald"},uses:1,maxUses:1}]}}Set the time to noon.
Open the trading screen of the villager and press the tab key until its trade is outlined.
Without moving your mouse cursor, wait for the trade to come back in stock.
Observe if the trade stays outlined.
Observed Behavior:
Keyboard-focused villager trades lose their focus when villagers restock.
Expected Behavior:
Keyboard-focused villager trades would not lose their focus when villagers restock.