When the player receives a dialog while they are typing something in chat, upon exiting the dialog their chat will be cleared and they will need to retype what they were just typing.
To reproduce
Place an impulse command block with the command
dialog show @p minecraft:custom_options
Connect it to a button with several (6-8) 4-tick redstone repeaters
Press the button, then quickly open chat and start tying something
When the dialog appears, the chat history and input field disappear, as if chat were closed– may be intended, but not desirableWhen the dialog appears, press Back or the escape key- it does not matter
❌ Although chat is now open again, whatever you were typing has been deleted
Impact of the issue
My assumption is that the dialog-chat interaction was known about when dialogs were being added to the game and it was decided to move ahead with the current behavior in the interest of implementing dialogs quickly. However, I do not think that this behavior should be considered intended, since it is frustrating and strictly disadvantageous when compared with a dialog system which renders on top of the existing chat UI rather than replacing it. I would encourage Mojang to explore whether it is possible to implement dialogs in the way described above, and I would submit that dialogs should render on top of all in-game UIs (chat, inventory, command block, etc.; the game menu that appears when pressing escape would still be temporarily canceled while the player is in a dialog), as well as the credits. If this is determined to be infeasible then the contents of the chat input field should be saved when the dialog appears and restored when it is exited.
Also, I would not be surprised if the server resource pack prompt exhibits the same behavior. If so, I would suggest fixing said behavior by fixing this bug first and then reimplementing said prompt using the new dialog system.
Could add a video? To help mojang?