Skip to content

Selection behavior in Documents dialog when closing documents #9482

Closed

Description

@nmatt

Apache NetBeans version

Apache NetBeans 30

What happened

In the Documents dialog (Window > Documents...), when closing a document (using the Delete key or Alt+L), the selection in the Documents list moves up to the document above the one that was closed. This is unusual and inconsistent with how deletion works in file managers and in the Projects and Files pane. It makes it less convenient to quickly close a number of adjacent documents by repeatedly hitting Delete, because you either have to start from the bottom, or re-navigate to the next document in-between, or first multi-select the documents to be closed.

=> Change the behavior so that when closing a document, the selection moves to the document after that (if any). This means that visually the selection stays in place, as the documents listed after the one having been deleted move up.

Language / Project Type / NetBeans Component

No response

How to reproduce

  1. Open a bunch of files in the editor.
  2. Invoke Windows > Documents... (or Shift+F4).
  3. Press arrow-down to move to some document in the middle of the list.
  4. Press Delete (or Alt+L) to close the selected document.
    => The previous document in the list becomes selected instead of the next document.

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows

JDK

21

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

No

Activity

  1. added
    kind:bug
    needs:triage
    on Jul 2, 2026
  2. changed the title [-]Focus behavior in Documents dialog when closing documents[/-] [+]Selection behavior in Documents dialog when closing documents[/+] on Jul 2, 2026
  3. added
    UI
    and removed
    needs:triage
    on Jul 16, 2026
  4. mbien commented on Jul 20, 2026

    @mbien
    Member

    proposed fix at #9527 (devbuild zip in workflow output)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    EditorUIkind:bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions