mojira.dev
MC-254202

Using an EditBox in a AbstractSelectionList.Entry causes Focus issues.

Description

Adding an instance of an EditBox to an instance of an AbstractSelectionList.Entry (where said Entry returns said EditBox as one of its children) causes issues with the EntryBox not loosing focus if the user clicks outside of entry the box is part of.

Reproduction:

  1. Create a new `ContainerObjectSelectionList` and add it to an interface as a child.

  2. Then add several child element entries to it, each with an EditBox.

  3. Start the game and open the UI

  4. Select one of the EditBoxes and start typing, note that the cursor shows up and that the border box is rendered in the focused color.

  5. Now select one other EditBox and start typing, note that the previous EditBox still shows all indications that it is being focused.

Cause:

The AbstractContainerEventHandler does not forcefully notify the previous focus that it has been unfocused.

The AbstractSelectionList does not notify the previously focused entry that it has been unfocused.

Comments 3

Seems this might be a duplicate of MC-147605.

This does not impact vanilla gameplay, so I have marked this issue as invalid

OrionDevelopment

(Unassigned)

Unconfirmed

(Unassigned)

1.19, 1.19.1 Pre-release 4

Retrieved