mojira.dev
MC-298405

Text components in the "label" of input controls in dialogs don't support "hover_event"

When using a dialog input control of any type (“boolean”, “text”, etc.), whose “label” tag is a text component with “hover_event”, the things don’t show up when hovering cursor on the text.

One way to fix this is to add “tooltip” tag to dialog input controls, just like dialog actions.

Comments 2

Yes, but I already posted this bug report

Can confirm with the following:

dialog show @p {  "type": "minecraft:multi_action",  "title": {    "text": "Input control hover event example"  },  "body": {    "type": "minecraft:plain_message",    "contents": {      "text": "The hover event for this message works perfectly fine",      "type": "text",      "hover_event": {        "action": "show_text",        "value": "The text message hover event works just fine"      }    }  },  "inputs": [    {      "type": "minecraft:text",      "key": "stringkey",      "label": {        "text": "Text Input",        "hover_event": {          "action": "show_text",          "value": "Hovery text of doom"        }      },      "initial": "The hover event doesn't work"    },    {      "type": "minecraft:boolean",      "key": "boolinput",      "label": {        "text": "Boolean",        "type": "text",        "extra": [          {            "text": " and some extra text to the right of it",            "type": "text",            "click_event": {              "action": "run_command",              "command": "execute as @p run say quack"            },            "hover_event": {              "action": "show_text",              "value": "This hover text will not show"            }          }        ],        "hover_event": {          "action": "show_text",          "value": "This text shows up as expected"        }      }    }  ],  "actions": [    {      "label": {        "text": "A very important button",        "hover_event": {          "action": "show_text",          "value": "This doesn't work of course because the input supports a tooltip"        }      },      "tooltip": "Tooltips work just fine of course"    }  ]}

I would expect expected that a text component would provide all the functionality it possibly can unless said functionality is expressly overridden (eg. no hover event on a dialog action because you can specify a tooltip) or the release notes specify that such functionality is disallowed on purpose.

TheUknownCreator

boq

Confirmed

Platform

Low

Data Packs, UI

1.21.6 Pre-Release 1

Retrieved