Large item tooltips can get cut off at the edges of the screen
The Bug:
Large item tooltips can get cut off at the edges of the screen.
Steps to Reproduce:
- Give yourself an item that has a large tooltip.
/give @s minecraft:dirt{display:{Lore:["{\"text\":\"MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757\"}"]}}
- Hold your mouse cursor over the item in order for its tooltip to be displayed.
- Take note as to whether or not large item tooltips can get cut off at the edges of the screen.
Observed Behavior:
Item tooltips can get cut off at the edges of the screen.
Expected Behavior:
Item tooltips would not get cut off at the edges of the screen.
Code Analysis:
Code analysis by Xander Smith can be found in this comment.
Linked Issues
is duplicated by1
relates to6
- Fixed
[Mod] AvomaTimothy Swan
- 29
- 19
- Confirmed
Normal
- UI
1.6.2 - 1.19.2
1.6.2 1.8.8 1.11.2 1.13.1 1.13.2 19w05a 19w06a 19w07a 19w08b 19w09a 19w11a 19w11b 19w12b 1.14 1.14.2 1.14.3 1.14.4-pre5 1.14.4 19w39a 19w41a 19w45b 19w46a 19w46b 1.15-pre1 1.15-pre2 1.15-pre3 1.15-pre4 1.15-pre5 1.15-pre6 1.15-pre7 1.15 1.15.1 1.15.1-pre1 1.15.2-pre2 1.15.2 20w06a 20w07a 20w11a 20w17a 20w19a 20w22a 1.16-pre1 1.16-pre2 1.16-pre3 1.16.2-rc1 1.16.2 1.16.4-pre2 1.16.4 20w45a 20w46a 20w51a 21w03a 21w05b 21w06a 21w07a 21w11a 21w14a 21w17a 1.17 1.17.1 1.18.1 1.18.2 22w12a 22w13a 22w17a 22w18a 1.19 1.19.1 1.19.2- 22w42a
Created Issue:
Item Description Text Pop-Up intersects the edge of the display
The text box would not intersect the edge of the screen if it was sometimes positioned below or above the cursor rather than the left or right side of it when it allows for the text box to fit within the screen.
See attachment.Environment
Mac OS X 10.7.5
Mac OS X 10.7.5, Linux Fedora 19 x86_64
The text box would not intersect the edge of the screen if it was sometimes positioned below or above the cursor rather than the left or right side of it when it allows for the text box to fit within the screen.
See attachment.The bug
The text box would not intersect the edge of the screen if it was sometimes positioned below or above the cursor rather than the left or right side of it when it allows for the text box to fit within the screen.
How to reproduce
- Run:
/give @p minecraft:dirt{display:{Lore:["{\"text\":\"Yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"}"]}}- Hover over the item.
→Goes off the edge of your screen
Mac OS X 10.7.5, Linux Fedora 19 x86_64
ItemDescriptionTextPop-Up intersects the edge of the displayItem description text pop-up intersects the edge of the display
Item description text pop-upintersectsthe edge of thedisplayItem description text pop-up gets cut off at the edge of the screen
is duplicated by
relates to
relates to
The
bugThe text box would not intersect the edge of the screen if it was sometimes positioned below or above the cursor rather than the left or right side of it when it allows for the text box to fit within the screen.
Howtoreproduce
- Run:
/give @p minecraft:dirt{display:{Lore:["{\"text\":\"Yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"}"]}}- Hover over the item.
→Goes off the edge of your screen
The Bug:
Large item tooltips can get cut off at the edges of the screen.
Steps to Reproduce:
- Give yourself an item that has a large tooltip.
/give @s minecraft:dirt{display:{Lore:["{\"text\":\"MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757\"}"]}}
- Hold your mouse cursor over the item in order for its tooltip to be displayed.
- Take note as to whether or not large item tooltips can get cut off at the edges of the screen.
Observed Behavior:
Item tooltips can get cut off at the edges of the screen.
Expected Behavior:
Item tooltips would not get cut off at the edges of the screen.
Item description text pop-upgetscut off at the edge of the screenLarge item tooltips can get cut off at the edges of the screen
The Bug:
Large item tooltips can get cut off at the edges of the screen.
Steps to Reproduce:
- Give yourself an item that has a large tooltip.
/give @s minecraft:dirt{display:{Lore:["{\"text\":\"MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757\"}"]}}
- Hold your mouse cursor over the item in order for its tooltip to be displayed.
- Take note as to whether or not large item tooltips can get cut off at the edges of the screen.
Observed Behavior:
Item tooltips can get cut off at the edges of the screen.
Expected Behavior:
Item tooltips would not get cut off at the edges of the screen.
Code Analysis:
Code analysis by Xander Smith can be found in this comment.
relates to
Thank you for your report!
We're tracking this issue in MC-26757, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
The bug
While hover texts created using hoverEvent by /tellraw in chat or in written books are wrapped if necessary (unlike villager restock hover text (MC-75699) or item tooltips (MC-26757)), they are sometimes wrapped too late making the hover text box too large and resulting in it being cut off.
See Hover text cut off (1.16.2-rc1).mp4
.
Reproduction steps
- Use the following command
/tellraw @s {"text":"hover hover hover hover hover hover hover hover","hoverEvent":{"action":"show_text","contents":{"text":"mm mm mmm mmm mmm mmmm mmmm mmmm mmmmm mmmmm mmmmm mmmmmm mmmmmm mmmmmm mmmmmmm mmmmmmm mmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm"}}} - Hover near the middle of the screen over the text
- Move your mouse slowly towards on of the horizontal edges of the screen
The hover text is cut off
Note: You might have to adjust the GUI scale or change the window width to reproduce this issue.
Long block names such as "Smooth Red Sandstone Stairs" or "Polished Blackstone Pressure Plate" can overlap or even extend past the height info in the superflat customization screen. This is also an issue for many other languages which have longer block names compared to English.
To reproduce, use this superflat preset:
minecraft:smooth_red_sandstone_stairs,minecraft:waxed_weathered_cut_copper_stairs,minecraft:polished_blackstone_pressure_plate;minecraft:the_void
Related issues: MC-26757, MC-203757
A possible quick fix could be making the two columns more spaced apart, and anchroing them to the window border so more room is available when the window is larger.





not exactly a bug, would be nice if that gets added.
This annoys me so much (especially on servers that have items with long lores).
A temporary workaround is to resize your window temporarily. I think making the window shorter is the way to go.
This is more like a feature request, also Incomplete because abandoned.
Its is also present in the latest stable version (1.8.8).
Also IMHO this should not be treated as a feature request, because its a game defect.
To prove it, I will add two screenshots.
shenziro, I've given you the issue, you're welcome to update and improve it.
Is this still an issue in the most recent versions (currently that is 1.10.2, or 16w42a) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time.
The issue appears to be fixed in only the specific instance shown in the first image from Timothy Swan. It isn't fixed in regards to long lore text, as in the second and third image from shenziro, or for other potions items. I tried it in both 1.11 and 1.11.2 and text often appears off the screen.
Confirmed for 1.13.1.
This can be seen with waxed slightly weathered cut copper stairs in the creative inventory using the default windowed resolution and the default GUI size. The name is quite long, so the tooltip gets moved to the left - too bad there's also not enough room on the left and thus it appears cut off. A possible fix would be moving the tooltip below the cursor if there's also not enough room on the left. Note that the name "Waxed Slightly Weathered Cut Copper Stairs" is fine and not the issue here, and it can't really be shortened without losing information about the block.
Confirmed for 20w45a and 1.16.4.
Can confirm in 20w51a.
Can confirm in 21w03a.
For comparison, this is how long tooltips are handled in Bedrock. If there's not enough room on the left it gets centered over the pointer.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 21w07a.
Can confirm in 21w11a.
Can confirm in 21w14a.
Can confirm in 21w17a.
Can confirm in 1.17.
Can confirm in 1.17.1.
I'd like to request ownership of this ticket since the current reporter has been inactive for over a year. I'm willing to keep this ticket updated and will continue to provide all of the necessary details.
Should be worth noting bedrock edition does the following:
1. if enough space, align top left with cursor
2. if not enough space right, but enough space left, align top right with cursor
3. if not enough space only right or only left, aligns top center with cursor
Java is only missing the 3rd one.
Can confirm in 1.18.1.
Can confirm in 1.18.2 and 22w12a.
Code analysis
Based on 1.18.2 yarn with custom local var names
This is the code to position the tooltip box. Another check should be added to center it.
For example
if (x < 0) { x = mouseX - width / 2 - 6 }Also affects many lines above eachother.
This issue was fixed in 22w42a and is no longer a problem.
It looks like Minecraft since 22w42a moves the hover text to the left border of the screen when there would otherwise not be enough space.
@[Mod] Avoma, it looks like the general issue described in this report ("large item tooltips can get cut off") can still occur when Minecraft does not wrap the text (which is the case here for item names, as shown in the reproduction steps). But that might be a separate issue, and possibly the Mojang developers might consider that a feature request.
This should be re-opened as the vanilla fix is awful.
For people who don't know, in the snapshots, tooltips now just aren't allowed to go off-screen to the left so simply blocks the view of the cursor and can still go off-screen if a line is longer than the screen width.
Not to mention this fix does nothing on the y axis, and tooltips with a lot of lines end up going off-screen at the top.
In that case it is up to the user to move the text to a new line; the new behavior matches bedrock edition.
For the vertical issue, I suggest you create a new report.