mojira.dev
MC-303344

Tooltips for selected items in dialogs are displayed even when the item isn't being hovered over

If an item in a dialog has its show_tooltip set to true, once clicked, its tooltip will show up no matter where on the screen the player’s cursor is, unless they are hovering over another item with show_tooltip set to true. This is quite annoying, especially for items with large tooltips.

To reproduce

  1. Place and power a command block with

    /dialog show @p {"type":"minecraft:notice","title":"Annoying tooltip bug","body":[{"type":"minecraft:item","item":{components:{"minecraft:enchantments":{"minecraft:unbreaking":3,"minecraft:feather_falling":2,"minecraft:frost_walker":1,"minecraft:blast_protection":4}},count:1,id:"minecraft:diamond_boots"},"description":{"text":"If you click on this text and then move your cursor away from it...","hover_event":{"action":"show_text","value":"...this tooltip disappears as expected."}},"show_tooltip":true},{"type":"minecraft:item","item":{components: {"minecraft:potion_contents": {potion: "minecraft:strong_turtle_master"}},count:1,id:"minecraft:splash_potion"},"description":{"text":"But the same cannot be said...","hover_event":{"action":"show_text","value":"...with the items to the left of the text."}},"show_tooltip":true}]}
  2. Click on the boots or the potion

  3. Move your cursor elsewhere
    ❌ The tooltip is still displayed

Expected behavior

The tooltip would only display when the item is actually being hovered over

Attachments

Comments 1

clamlol

(Unassigned)

Confirmed

(Unassigned)

1.21.10, 25w42a

Retrieved