The bug
When an item is placed in the enchantment table, it is possible to confirm which enchantment to apply using any mouse button, be it the right button, middle button, forward button, back button, or buttons 6, 7 or 8.
Whether or not the mouse buttons are bound to any in-game controls is irrelevant.
How to reproduce
Have a mouse with more than one button, and preferably more than three buttons
Place an item into an enchanting table, with lapis lazuli if required
Press the highest mouse button you have while mousing over one of the available options
Expected results
Nothing should happen.
Actual results
The item is enchanted as though you left-clicked.
Despite MC-312640, MC-312641 and MC-312669 (which should all be marked as related) being fixed in today’s snapshot, this still affects it.