Affects Version/s: Minecraft 17w43a, Minecraft 17w43b, Minecraft 17w45a, Minecraft 17w45b, Minecraft 17w46a, Minecraft 17w47a, Minecraft 17w47b, Minecraft 17w48a, Minecraft 17w49a, Minecraft 17w49b, Minecraft 17w50a, Minecraft 18w02a, Minecraft 18w05a, Minecraft 18w11a, Minecraft 18w16a, Minecraft 18w19b, Minecraft 18w20a, Minecraft 18w20b
Fix Version/s: Minecraft 18w20c
When in any command block, the first button press locks the "Done" button. When copying a command into the block if you haven't typed a character in it first (such as / ), this also locks the done button.
The second image was a pasted in command.
In 18w05a it looks like the reason is that bsq.keyPressed(int, int, int) disables the button before calling the parent method which likely writes the text in the text field.
However, the "Done" button should not be disabled at all because an empty command block has valid use cases if your command structure has to match a certain layout and you have to use empty chain command blocks to not break the chain.
Note: You can find this class by search for the string advMode.mode.redstoneTriggered and then opening the parent class of the found class.