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.

Related issues

MC-3242 When typing in windowed, and switching to full screen, whatever you typed it gone. MC-3420 IP's text disappear of textbox when you maximize the window MC-3968 When resizing the window when you have something in the direct connect box, it will be gone MC-4034 Server adres - \ resize bug MC-5000 Text field contents removed on fullscreen change. MC-7885 Typing in a text box then altering screen orientation deletes the text MC-9521 Resizing screen removes any text written in chat bar MC-10000 Text vanishes on resize MC-14894 Text disappears when you resize the window MC-15993 Minimizing While in Anvil MC-16130 Choosing flatworld preset in windowed mode then switching to full screen mode removes preset MC-17377 Text Fields Lose Changes After Resizing MC-25938 Resizing game window loses text box contents MC-29295 Minimising the Minecraft client removes command line text MC-30385 Resource packs revert when window resized MC-30394 Resource Pack will change reset its on/off state, when Changing Window Size MC-30896 leaving or changing windows deletes the command block writing MC-31101 When typing a command, if i minimize or go full screen the command is deleted. MC-35483 Resizing the game window drops unsaved changes made to server information. MC-44170 When i resize the direct connect window it reloads the last address I typed. MC-49380 Commands erase when resizing window while typing command in command block. MC-55657 "Create New World" button in "Create New World" menu (after removing the world name) gets re-enabled after resizing window MC-63599 Pressing F11 while in scrolled down inventory puts it back at the top. MC-63918 Maximixe direct conect bug MC-68314 Creative Search Bar Clears when entering fullscreen MC-71957 Resetting fields with Add Server MC-75559 Chat/Command window loses data on fullscreen toggle MC-76001 "Loading world" text disappears when resizing the window while the world is being loaded/created MC-78975 Chat cleared when reformatting window MC-81014 Minecraft Text Disappear MC-81146 Text in chat bar clears when resizing window MC-82588 add server address - f11 deletes input MC-84559 Editing a command block and then changing window resets command block. MC-85445 Chat box clears when window is resized MC-87753 bugs with commandblocks and /summon MC-87813 Command Block buttons become unavailable on resize MC-88121 bugs about commandblock UI MC-88122 bugs about commandblock UI MC-88234 Creative search disappears when window is resized MC-88836 Command block don't show command after scaling MC-89532 The Text Issue MC-91309 Command block text disappears when screen size is changed MC-91667 Server textbox bug MC-93112 Commandblock bug MC-94854 Text fields "add server" clear when resizing window MC-95027 Command block GUI failed after adjusting the window size MC-95329 Input field for IP address resets upon going to fullscreen MC-96702 Exiting fullscreen deletes chat and command block typing progress MC-98576 Commands in command blocks lost when resizing window MC-98762 F11 - Command block Command missing MC-100242 Chat line get cleared when setting game on full screen. MC-100634 command blocks emptied after resizing screen MC-102787 Command block's commands disappear after minimizing/maximizing MC-106349 Command Block Glitches when Changing Window Sizes MC-114799 A command block's command is deleted when exiting full screen MC-118762 Statistics Tab resets after resize MC-120196 Maximizing the window while loading a world causes the "Loading World" text to disappear MC-121470 Losing game focus in the statistics screen returns you to the "General" tab MC-122818 Text in open command block gets erased when minimizing or resizing the console MC-123137 Chat clears when switching windows MC-123911 Switching windows with something in the chat input clears the current input MC-124609 Chat/Commands deleted when game minimized MC-125531 Resizing the game window will clear any text in the chatbox MC-129174 Commands get erased on exiting full screen MC-129452 Chat box cleared when Minecraft window loses focus in fullscreen MC-131842 Un-fullscreening takes away chat text if you are in the middle of typing it

Comments

migrated

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

Ezekiel

It has always been present as far as I know

migrated

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

kumasasa

Maybe related to grayed out buttons

migrated

Seems fixed in 1.4.7

Ezekiel

It is partially fixed, I think. For instance, the seed text file doesn't reset when toggling, but the chat field does.

migrated

Still happens with the chat in 1.5

migrated

Also happens in the “Edit Server Info” screen (or at least when adding a new server).

migrated

Still happens in 13w26a.

migrated

still happens in 1.6.1. At least with the chat box.

migrated

yes, still happens in 1.6.2

migrated

Affects snapshot 13w36a.

GoodKingFilms

still in 1.7.2

migrated

Affects snapshot 13w47c.

migrated

This is still an issue in Minecraft version 14w03b.

migrated

Still in 14w06b. Looks like its a pretty hard bug to be fixed.

migrated

Came across this issue in 14w07a today.

migrated

Still an issue in 14w10c

migrated

I think I found a different manifestation of this bug in the Command Block GUI. The difference was that I already saved a command inside (which would have remained if I didn't save my changes), and I pressed F11 and the old text was there.

I wasn't ADDING text, note, I was using the backspace key when I slipped and went into fullscreen. I'm also using 14w21b.

Sonicwave

Confirmed in 1.8.

Sonicwave

Also affects 1.8.1-pre1.

Sonicwave

Still in 1.8.1-pre2 (just deleted a nether superflat code I was working on 😞).

Sonicwave

Confirmed for 1.8.1.

migrated

Confirmed for 1.8.2-pre5.

migrated

Confirmed for 1.8.2-pre6

migrated

Confirmed for 1.8.4

migrated

Confirmed for 1.8.5, 1.8.6, and 1.8.7

migrated

Something similar to this also happens in the statistics menu, being scrolled down on the first page or being on another page and resizing puts you back to the first page again.

migrated

Can confirm for all 1.9 snapshots.

migrated

Affects 15w45a.

migrated

Affects 15w46a.

migrated

Confirmed in 15w47c for Command blocks, Chat, Anvil and Inventory search bar.

migrated

Affects 15w49a, tested with chat and Creative inventory.

migrated

Affects 15w50a.

migrated

Affects 15w51b.

migrated

Affects 16w02a.

migrated

Affects 16w03a.

migrated

Affects 16w04a.

migrated

Never seen, probably because I play mostly 1.8.9

marcono1234

Confirmed for

  • 16w05b

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 func_175273_b(Minecraft mcIn, int p_175273_2_, int p_175273_3_) 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.

Could you please link to this comment in the description

migrated

Affects 16w06a.

migrated

Affects 16w07a.

migrated

Affects 16w07b.

migrated

Confirmed for 1.9-pre1

migrated

Affects 1.9-pre3.

migrated

Affects 1.9-pre4.

migrated

Affects 1.9.1-pre3.

migrated

Affects 1.9.2.

migrated

Affects 16w20a and OS X 10.11.5.

migrated

Confirmed for Pre 1.10

migrated

Confirmed for Pre2 1.10

migrated

Confirmed for 1.10

FaRo1

Confirmed for 1.10.1.

migrated

Confirmed 1.10.2

[Mod] Neko

1.10.2 is already listed.

migrated

Can confirm for all 1.11 snapshots

Misode

Confirmed for 1.11.2

migrated

i hate this bug, maybe i'm writing a long command in a small window because im seeing the wiki to see how do i write te command, and when i want to fullscreen the game to continue writing the entire commands dissapear

migrated

Confirmed for all 1.12 snapshots and 1.12-pre1, 1.12-pre2 and 1.12-pre3

tryashtar

As MC-121470 was marked as duplicating this, I'd like to add the following information:

  • This bug now also resets the scroll bars in the statistics menu and returns you to the "General" tab.

  • This bug now occurs when the user alt-tabs out of the game in fullscreen.

  • This bug now also disables most of a command block interface.

FaRo1

Is this still caused by what's in the code analysis?

tryashtar

It will also, for example, enable the "create world" button when it's supposed to be disabled (if there's no provided world name).

EchoBlade

Confirmed for 17w50a.

migrated

confirmed in 18w03b for command block gui.

Sonicwave

Confirmed for 18w05a

_Spitz

Confirmed for 18w07b

bugmancx

Confirmed for 18w20c

migrated

This is fixed for all text fields, but not scroll bars (pre2)

(let me know if i missed any)

migrated

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

migrated

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

migrated

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.

migrated

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

violine1101

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

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