Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-254202

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.19, 1.19.1 Pre-release 4
    • None
    • Windows 11
      Java 17 (Both JBR as well as OpenJDK)
      Debugged in MinecraftForge and Fabric.
    • Unconfirmed
    • (Unassigned)

      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.

            Unassigned Unassigned
            OrionDevelopment OrionDevelopment
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: