mojira.dev
MC-258

Most text boxes / chat / scroll bars revert when the window changes size, fullscreen mode is toggled, or fullscreened game is tabbed into

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

  1. Press 't' to bring up the console

  2. Type something but don't send it

  3. Toggle fullscreen or resize the window

  4. 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

MC-3242 When typing in windowed, and switching to full screen, whatever you typed it gone. Resolved MC-3420 IP's text disappear of textbox when you maximize the window Resolved MC-3968 When resizing the window when you have something in the direct connect box, it will be gone Resolved MC-4034 Server adres - \ resize bug Resolved MC-5000 Text field contents removed on fullscreen change. Resolved

Comments 73

This does indeed happen as described. Not sure if it was present in previous versions, but it does exist in 1.4.2-PRE

It has always been present as far as I know

This also Happens with Text Boxes in the Main Menu, the "Preset" Textbox for superflat Worlds for example

Maybe related to grayed out buttons

Seems fixed in 1.4.7

63 more comments
Tedstar (Curtis Anderson)

@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).

Rikard Herlitz

@unknown Thanks. I've fixed these too and they should work in the next update!

Tedstar (Curtis Anderson)

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.

Rikard Herlitz

Thank you! I've fixed those as well now 🙂

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

5ives

Sonicwave

migrated

Confirmed

box, resize, revert, server, text, window

Minecraft 1.4.1, Minecraft 1.4.2, Minecraft 1.4.3, Minecraft 1.4.4, Minecraft 1.4.5, ..., Minecraft 18w20c, Minecraft 18w21a, Minecraft 18w21b, Minecraft 18w22c, Minecraft 1.13-pre1

Minecraft 1.13-pre3

Retrieved