The bug
Triggers
toggling fullscreen
resizing the window
alt-tabbing out of the game in fullscreen (as of 17w43+)
Results
Changing text in most text boxes then will revert the text. Exceptions are naming (not renaming) a world, entering a seed and writing on a sign.
also resets the scroll bars in the statistics menu and returns you to the "General" tab.
disables most of a command block interface (as of 17w43+)
How to reproduce
Press 't' to bring up the console
Type something but don't send it
Toggle fullscreen or resize the window
The text disappears, or reverts to nothing when it should remain
Code analysis
from @unknown:
The reason for this is that the private void resize(int width, int height)
method of the net.minecraft.client.Minecraft
class (MCP names for Minecraft 1.8) calls the public void onResize(Minecraft mcIn, int width, int height)
method of the net.minecraft.client.gui.GuiScreen
class. This method however is a method that creates (not updates) the GUI. A partial fix would be to have the private void resize(int width, int height)
method call some kind of updating method only and passing the width and height. Additionally textboxes could have an anonymous class that calculates the position based on the attributes of the screen it is in.
Linked issues
is duplicated by 66
relates to 6
Comments 73
This also Happens with Text Boxes in the Main Menu, the "Preset" Textbox for superflat Worlds for example
@rherlitz
The text in the "Select a Preset" screen (Create New World > More World Options... > World Type: Superflat > Customize > Presets) reverts when the window changes size in pre2. It may be a separate issue though because it's perfectly fine for alt-tab out of and back into the window.
Also the recipe book search field goes blank on resize (but not alt-tab) for all three variants (inventory, crafting table, and furnace).
Awesome! Oh and I just though to check the structure block; the name field for all four versions of the GUI is also affected. Not sure about the controls, don't really know how the structure block works. ¯_(ツ)_/¯
Edit: Ok I was figuring out how the structure block works. Changing window size resets all modified text fields. It also appears to disable the text fields. Buttons keep their settings even when changed.
also resets the scroll bars in the statistics menu and returns you to the "General" tab.
That still appears to be the case, I've created a new bug report about that here: MC-213104
This does indeed happen as described. Not sure if it was present in previous versions, but it does exist in 1.4.2-PRE