You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can not deselect/unfocus Text fields with Enter key.
Unlike description in here, it WORKS in my env: survival mode, press E to open inventory screen, then press T to focus on input field, then press Enter to deselect.
It can't work on CreativeInventoryScreen and AnvilScreen, can work on InventoryScreen and CraftingScreen.
Why it can't work:
When the Enter key is pressed, the this.focusUnlocked condition at TextFieldWidget.setFocused() is false, so it will skip the rest of the logic. How to properly invoking setFocusUnlocked()? I'm not sure for now.
Can not enter characters if you directly press the T to focus on search box in recipe book once open inventory controls menu.
Here is the reason: When any key is pressed while a screen is opening, the code inside ParentElement is triggered by keyboard listener.
Set a break point on TextFieldWidget.setFocused() and check the logic when clicking on the search box to make it focused, we'll know that after InventoryScreen.mouseClicked():150, there is another this.setFocused(this.recipeBook);. That's what our manually invoking has missed.
I suggest that we can simulate a mouse click for T key.
The text was updated successfully, but these errors were encountered:
Can not deselect/unfocus Text fields with
Enter
key.Unlike description in here, it WORKS in my env: survival mode, press
E
to open inventory screen, then pressT
to focus on input field, then pressEnter
to deselect.It can't work on
CreativeInventoryScreen
andAnvilScreen
, can work onInventoryScreen
andCraftingScreen
.Why it can't work:
When the
Enter
key is pressed, thethis.focusUnlocked
condition atTextFieldWidget.setFocused()
isfalse
, so it will skip the rest of the logic. How to properly invokingsetFocusUnlocked()
? I'm not sure for now.Can not enter characters if you directly press the
T
to focus on search box in recipe book once open inventory controls menu.Here is the reason: When any key is pressed while a screen is opening, the code inside
ParentElement
is triggered by keyboard listener.And the
this.getFocused()
will return null.Set a break point on
TextFieldWidget.setFocused()
and check the logic when clicking on the search box to make it focused, we'll know that afterInventoryScreen.mouseClicked():150
, there is anotherthis.setFocused(this.recipeBook);
. That's what our manually invoking has missed.I suggest that we can simulate a mouse click for
T
key.The text was updated successfully, but these errors were encountered: