Bug report: When using an anvil, if I select an item to enchant then change my mind and hit the cross to exit the anvil, the anvil disappears as though it were used but I lose the opportunity to enchant anything
It's not a bug. Once you've selected an item and seen the potential enchantment, you can't take back your choice anymore. You can either accept the new enchantment or keep your old enchantment. Closing to exit is equivalent to keeping your old enchantment.