Unable to close anvil using inventory key without taking the input item out, if textfield has focus
The bug
When trying to exit the Anvil GUI, if there is an item in the input slot and the textfield has focus, the inventory key cannot close the GUI. However after taking the item out and then trying to exit using the inventory key it exits correctly.
How to reproduce:
- Right-click an anvil
- Place an item on the left, like e.g. Stone
Click on the textfield or press TAB to give it focus(this step was introduced in 20w10a, because the textfield doesn't start focused anymore but was fixed later)- Use the inventory key to close the GUI
>
Nothing happens - Now take out the item and try the inventory key again
>
GUI now closes
- Unresolved
[Helper] Jack McKalling- 10
- 3
- Confirmed
- (Unassigned)
- anvil
19w14b - 1.21
19w14b 1.14-pre1 1.14-pre2 1.14-pre3 1.14-pre4 1.14-pre5 1.14 1.14.1-pre1 1.14.1-pre2 1.14.1 1.14.2 1.14.3-pre1 1.14.3-pre2 1.14.3-pre3 1.14.3-pre4 1.14.3 1.14.4-pre1 1.14.4-pre2 1.14.4-pre3 1.14.4-pre4 1.14.4-pre5 1.14.4-pre6 1.14.4-pre7 1.14.4 19w34a 19w35a 19w37a 19w38b 19w38a 19w39a 19w40a 19w41a 19w42a 19w44a 19w45a 19w45b 19w46a 19w46b 1.15-pre1 1.15-pre2 1.15-pre3 1.15-pre4 1.15-pre5 1.15-pre7 1.15 1.15.1 1.15.1-pre1 1.15.2-pre1 1.15.2-pre2 1.15.2 20w06a 20w07a 20w08a 20w09a 20w10a 20w11a 20w12a 20w13a 20w13b 20w14a 20w15a 20w16a 20w17a 20w18a 20w19a 20w20b 20w21a 20w22a 1.16-pre1 1.16-pre2 1.16-pre3 1.16-pre4 1.16-pre5 1.16-pre7 1.16-pre8 1.16-rc1 1.16 1.16.1 20w27a 20w28a 20w29a 20w30a 1.16.2-pre1 1.16.2-pre2 1.16.2-rc1 1.16.2-rc2 1.16.2 1.16.3-rc1 1.16.3 1.16.4-pre1 1.16.4-pre2 1.16.4-rc1 1.16.4 20w45a 20w46a 20w48a 20w49a 20w51a 21w03a 1.16.5 21w05a 21w05b 21w06a 21w07a 21w08b 21w10a 21w11a 21w13a 21w14a 21w15a 21w16a 21w17a 21w18a 21w19a 21w20a 1.17-rc2 1.17 1.17.1 1.21
Created Issue:
Unable to close anvil using inventory key without taking the input item out
When trying to exit the Anvil GUI, if there is an item in the input slot with focus on the textfield, using the inventory key does not exit the GUI. However after taking the item out and then trying to exit using the inventory key it exits correctly.
How to reproduce:
- Right-click an anvil
- Place an item on the left, like e.g. Stone
- Press TAB to focus the textfield
- Use the inventory key to close the GUI, nothing happens
- Now take out the item and try the inventory key again, GUI now closes
When trying to exit the Anvil GUI, if there is an item in the input slot
with focus on the textfield, using the inventory key does not exit the GUI. However after taking the item out and then trying to exit using the inventory key it exits correctly.How to reproduce:
- Right-click an anvil
- Place an item on the left, like e.g. Stone
Press TAB to focus the textfield- Use the inventory key to close the GUI, nothing happens
- Now take out the item and try the inventory key again, GUI now closes
When trying to exit the Anvil GUI, if there is an item in the input slot, using the inventory key does not exit the GUI. However after taking the item out and then trying to exit using the inventory key it exits correctly.
How to reproduce:
- Right-click an anvil
- Place an item on the left, like e.g. Stone
- Use the inventory key to close the GUI, nothing happens
- Now take out the item and try the inventory key again, GUI now closes
Unable to close anvil using inventory key without taking the input item out, if textfield has focus
When trying to exit the Anvil GUI, if there is an item in the input slot
, usingthe inventory keydoes not exitthe GUI. However after taking the item out and then trying to exit using the inventory key it exits correctly.How to reproduce:
- Right-click an anvil
- Place an item on the left, like e.g. Stone
- Use the inventory key to close the GUI, nothing happens
- Now take out the item and try the inventory key again, GUI now closes
When trying to exit the Anvil GUI, if there is an item in the input slot and the textfield has focus, the inventory key cannot close the GUI. However after taking the item out and then trying to exit using the inventory key it exits correctly.
How to reproduce:
- Right-click an anvil
- Place an item on the left, like e.g. Stone
- Click on the textfield or press TAB to give it focus (this step was introduced in 20w10a, because the textfield doesn't start focused anymore)
- Use the inventory key to close the GUI, nothing happens
- Now take out the item and try the inventory key again, GUI now closes
relates to
When trying to exit the Anvil GUI, if there is an item in the input slot and the textfield has focus, the inventory key cannot close the GUI. However after taking the item out and then trying to exit using the inventory key it exits correctly.
How to reproduce:
- Right-click an anvil
- Place an item on the left, like e.g. Stone
Click on the textfield or press TAB to give it focusthis step was introduced in 20w10a, because the textfield doesn't start focused anymore)(- Use the inventory key to close the GUI, nothing happens
- Now take out the item and try the inventory key again, GUI now closes
When trying to exit the Anvil GUI, if there is an item in the input slot and the textfield has focus, the inventory key cannot close the GUI. However after taking the item out and then trying to exit using the inventory key it exits correctly.
How to reproduce:
- Right-click an anvil
- Place an item on the left, like e.g. Stone
Click on the textfield or press TAB to give it focus(this step was introduced in 20w10a, because the textfield doesn't start focused anymore but was fixed later)- Use the inventory key to close the GUI, nothing happens
- Now take out the item and try the inventory key again, GUI now closes
When trying to exit the Anvil GUI, if there is an item in the input slot and the textfield has focus, the inventory key cannot close the GUI. However after taking the item out and then trying to exit using the inventory key it exits correctly.
How to reproduce:
- Right-click an anvil
- Place an item on the left, like e.g. Stone
Click on the textfield or press TAB to give it focus(this step was introduced in 20w10a, because the textfield doesn't start focused anymore but was fixed later)- Use the inventory key to close the GUI, nothing happens
- Now take out the item and try the inventory key again, GUI now closes
When trying to exit the Anvil GUI, if there is an item in the input slot and the textfield has focus, the inventory key cannot close the GUI. However after taking the item out and then trying to exit using the inventory key it exits correctly.
How to reproduce:
- Right-click an anvil
- Place an item on the left, like e.g. Stone
Click on the textfield or press TAB to give it focus(this step was introduced in 20w10a, because the textfield doesn't start focused anymore but was fixed later)- Use the inventory key to close the GUI
>Nothing happens
- Now take out the item and try the inventory key again
>GUI now closes
When trying to exit the Anvil GUI, if there is an item in the input slot and the textfield has focus, the inventory key cannot close the GUI. However after taking the item out and then trying to exit using the inventory key it exits correctly.
How to reproduce:
- Right-click an anvil
- Place an item on the left, like e.g. Stone
Click on the textfield or press TAB to give it focus(this step was introduced in 20w10a, because the textfield doesn't start focused anymore but was fixed later)- Use the inventory key to close the GUI
>Nothing happens
- Now take out the item and try the inventory key again
>GUI now closes
The bug
When trying to exit the Anvil GUI, if there is an item in the input slot and the textfield has focus, the inventory key cannot close the GUI. However after taking the item out and then trying to exit using the inventory key it exits correctly.
How to reproduce:
- Right-click an anvil
- Place an item on the left, like e.g. Stone
Click on the textfield or press TAB to give it focus(this step was introduced in 20w10a, because the textfield doesn't start focused anymore but was fixed later)- Use the inventory key to close the GUI
>Nothing happens
- Now take out the item and try the inventory key again
>GUI now closes
Still not fully fixed in 19w14b.
When the textfield has focus and there is an item to be renamed in the input slot, you still can't close the GUI with the inventory key.
*Edit:
New ticket opened at MC-147727

Follow-up of
MC-147184Because the anvil doesn't focus the textfield anymore, I just discovered in 20w10a that the focus is required for this bug to happen. If the textfield has no focus, pressing the inventory key correctly closes the GUI.