The bug
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
was a pasted in command.
Code analysis
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.
Very weird behavior and reminiscent of MC-121302. I've observed the button being enabled with no text, then becoming disabled after pressing any key (e.g. numlock).
After 1.9, normal command blocks were never supposed to have the "Done" button disabled.