Skip to content

Documents Window: keep selection after document is closed#9527

Open
mbien wants to merge 1 commit into
apache:deliveryfrom
mbien:doc-dialog-selection
Open

Documents Window: keep selection after document is closed#9527
mbien wants to merge 1 commit into
apache:deliveryfrom
mbien:doc-dialog-selection

Conversation

@mbien

@mbien mbien commented Jul 20, 2026

Copy link
Copy Markdown
Member

Don't move the selection after a node was removed. The same index should remain selected after list modification. If multiple nodes were selected, the selection start index will become the new selection.

This leads to a more natural way of removing items from a list. (e.g via Delete key)

doc list:
 - A
 - B <- selected, now press Delete
 - C

after B closed:
 - A
 - C <- selected, press Delete again

after C closed:
 - A <- selected, ...

fixes #9482

Don't move the selection after a node was removed. The same index
should remain selected after list modification. If multiple nodes were
selected, the selection start index will become the new selection.

This leads to a more natural way of removing items from a list.
(e.g via Delete key)
@mbien mbien added this to the NB31 milestone Jul 20, 2026
@mbien mbien added Editor UI User Interface ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Jul 20, 2026

@lkishalmi lkishalmi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@mbien mbien linked an issue Jul 20, 2026 that may be closed by this pull request

@neilcsmith-net neilcsmith-net left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM2, thanks!

Nit : tidy up and behaviour changes in separate commits is more understandable.

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

Labels

ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Editor UI User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Selection behavior in Documents dialog when closing documents

3 participants