If the after_action field isn’t set to “close” (I tried by puting “none”), when we press Esacpe key it close as expected the dialog, but if we click on this button, the dialog isn’t closed, but the button in the footer shouldn’t prevent to close the dialog by clicking on it…
You see, buttons in “actions” field that you put after body, doesn’t close the dialog as expected, but the button in the footer doesn’t close the dialog too…
Steps to reproduce :
Place an Impulse Command Block with this command :
dialog show @p { "type": "minecraft:multi_action", "title": "Test Closing Dialog", "can_close_with_escape": true, "pause": false, "after_action": "none", "exit_action": { "label": "Close", "width": 50 }, "actions": [ { "label": "Test", "width": 50, "action": { "type": "minecraft:run_command", "command": "tellraw @s \"Test\"" } } ]}
Place a button on the command block
Press the button
Try to press the Close button, and try to press your Escape key
Observed result :
The dialog isn’t closed when you press the Close button, but when you press your Escape key, it’s closed.
Expected result :
The dialog should be closed when you press the Close button or when you press your Escape key.
Environment
Windows 10
Java Edition
Related issues
relates to
Comments


but the button in the footer that close the dialog should close the dialog like when we press escape key (we can disable exit by pressing escape and put “after_action” to “none” and we are stuck in the dialog…)

Unless I’m misunderstanding the changelog, what I’m saying is that the purpose of after_action: "none"
is to not close the dialog.
(1.21.6 Pre-Release 1 changelog)after_action
- an additional operation performed on the dialog after click or submit actions, default: close
none
- does nothing, i.e. keeps the current dialog screen open

Huh, that was weird:
(1.21.6 Pre-Release 1 changelog)after_action
- an additional operation performed on the dialog after click or submit actions, default: close
none
- does nothing, i.e. keeps the current dialog screen open

But, I want to close the dialog with ONLY by clicking on THE button of the footer, not the other buttons. And when I press my Escape key, it close (the escape key does the same thing that the button in the footer or the No button)

flow_santohyj123

and if we disable the close when pressing the escape key, we CAN’T close the dialog
It’s a problem

When we press the escape key, it execute the exit action but not the button, so it’s not logic

My point is, this seems like intentional behavior. This would be a feature request to change after_action
’s behavior.

So, you can explain why the exist action is called “exit_action” and can be executed by clicking on the button or with the escape key ?

flow_santohyj123

Thank you for your report!
After consideration, the issue is being closed as Working as Intended.
Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.
Full Version History – Snapshot Version History – The official Minecraft feedback site
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

[Mojang] Triage Team but the exit_action is called “exit_action” and is executed when pressing on the button in the footer or when we press the escape key, and the“exit_action” executes an action even if the “after_action” is set to “none” it’s not logic because it should execute an action ONLY if the dialog as been closed
But isn’t that the purpose of
after_action
?