Entering the "confirm command execution" prompt in singleplayer pauses any sounds currently playing until the player exits a dialog, rather than until they exit the prompt.
To reproduce
Place an impulse command block and give it the following command:
dialog show @p {type:"minecraft:multi_action",title:"Bug demo",body:[{item:{id:"minecraft:mossy_cobblestone"},type:"minecraft:item",description:[{text:"Play ender dragon death sound",click_event:{action:"run_command",command:"playsound minecraft:entity.ender_dragon.death player @s"},hover_event:{action:"show_text",value:"Click!"}}]}],actions:[{label:"close dialog"}],pause:false}Place a button on the command block and press it
Click the text to play the ender dragon death sound
Click “Run Command” when prompted
Immediately press the button again and click the text again
✅ The game is paused while the prompt is on screen, so the sound currently playing is also pausedClick “Back”
❌ The sound does not resume even though the game is no longer pausedClick the “close dialog” button or press Escape
The sound finally resumes
Expected behavior
The sound would resume immediately upon clicking “Back”
Notes
Although I’ve only tested with text components with click events, this likely affects buttons and other elements as well.
As the attached video demonstrates, this issue also occurs when clicking “Run Command” if the player is immediately put into another dialog.
This issue seems like a super-case of MC-298466.
My two cents
The best and easiest fix for this is to simply remove the prompt altogether, at least for well-formed commands, since it precludes lots of functionality and trying to use /trigger as a workaround incurs a tick of delay and prints a message to the chat. Insofar as the prompt serves to prevent players from unwittingly activating things when clicking on text, the addition of the cursor changes has made this less much less of an issue, and if such text were also given a visual indicator (such as a soft highlight or glow) when hovered then the issue would be gone completely. If the prompt has any other value it’s not clear to me what it is, I only know it as a major impediment to datapack developers such as myself.
Linked issues
Attachments
Comments 2
If enough sounds are blocked by this effect (due to the prompt being brought up repeatedly while sounds are playing and the player never exiting a dialog), sounds will simply fail to play until the player exits a dialog. In the example below, block.enchanting_table.use and block.grindstone.use are supposed to be played when the corresponding text component is clicked, but they are not played until later.