The bug
Moving items in your inventory displays the next variant of a recipe with multiple variants.
How to reproduce
Make sure you have at least two bed recipes
/recipe give @s minecraft:white_bed /recipe give @s minecraft:orange_bedSet the maximum FPS to 10 (see MC-116625)
Open the recipe book
Select a tab where the bed recipes are visible
Click on the search bar
Pick up and place items in your inventory
→ The displayed bed variant changes faster than without moving items
Confirmed for 1.12-pre4