This glitch is reproducible in both singleplayer and multiplayer.
If there are items in your crafting table menu (I didn't test with inventory crafting but I think it would produce the same results) and you don't have enough room to fit all of them into your inventory slots, clicking on another item to craft causes some of them to be deleted. For a visual recreation click here. I didn't see this reported elsewhere so I hope it's not a duplicate.
Thanks for the report!
It looks like this is a duplicate of MC-122000; I've linked that to this report. No worries, the exact behavior is hard to describe so finding that via searching would be hard (I only found it because I knew about the related issue MC-120622 and that was linked as related too).