The bug
When you simply click on input boxes in a certain order, the typing cursor shows for all the boxes. However, what you type will only go in the last box that you clicked.
Note: I get the impression that this happens when you first select a box "below" the next one.
How to reproduce
Go to a place where there is more than one input box (for example in a structure block or in the "add multiplayer server" menu)
Click on all the input boxes in several different orders
Examples
Here are some examples in videos:
Bug additions (Thanks Matolcsy Attila)
The bug is only visual, you can still only edit one box a time
Bug only appears when using mouse clicks, not while using
Shift+TabBug only appears if Server Adress is selected first, not the other way
Code Analysis provided by @unknown found in this comment
Linked issues
is duplicated by 36
relates to 2
Attachments
Comments 23
Also affects the 'edit server info' screen... presumably every screen with more than one text field in it is affected.
Code analysis using Yarn mappings:
The ParentElement#mouseClicked method iterates over children, returning early if a child handles a mouse click. Since text field widgets handle unfocusing within these clicks (TextFieldWidget#mouseClicked), if a prior child handles a mouse click successfully, then they will never get the chance to check for unfocusing. As a result, clicking a text field widget that's before another text field widget in the children list will not unfocus the latter text field widget.
A potential solution is to separate unfocusing clicking logic in a way that prevents it from being short-circuited.
This also affects jigsaw and command blocks. I updated the ticket to include them.