Skip to content

Private/caolan/treeview focus and selection25#15182

Merged
eszkadev merged 4 commits intodistro/collabora/co-25.04from
private/caolan/treeview_focus_and_selection25
Mar 26, 2026
Merged

Private/caolan/treeview focus and selection25#15182
eszkadev merged 4 commits intodistro/collabora/co-25.04from
private/caolan/treeview_focus_and_selection25

Conversation

@caolanm
Copy link
Copy Markdown
Contributor

@caolanm caolanm commented Mar 24, 2026

  • Resolves: #
  • Target version: main

Summary

TODO

  • ...

Checklist

  • I have run make prettier-write and formatted the code.
  • All commits have Change-Id
  • I have run tests with make check
  • I have issued make run and manually verified that everything looks okay
  • Documentation (manuals or wiki) has been updated or is not required

@caolanm caolanm force-pushed the private/caolan/treeview_focus_and_selection25 branch 2 times, most recently from e083f96 to 5de63bd Compare March 25, 2026 09:29
caolanm added 4 commits March 25, 2026 21:29
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I28ad5af87f9f6bbf7f738f1a4bda7310cd445134
Treeview rows had no id attribute. When pressing Enter on a treeview
entry, core triggers _updateWidgetImpl.

That method saves document.activeElement.id, rebuilds the widget, then
tries to restore focus by finding an element with that the old id. Since
the button had no id the fallback of sending focus to the document body
happens.

Use the same fix and pattern as:

  commit 3f985cb
  Date:   Tue Jun 17 13:23:38 2025 +0530

      iconview: added support for keyboard navigation after click

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ie37a93dc52d41668169a8c03bcae23c82ad9c710
it goes from the dialog to the document. This can be seen in
the chapter/heading dialog in writer. Open the dialog, press twice
to ensure the focus can be seen in the treeview, press return,
the focus disappears and up/down no longer had an effect.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Iede45ff2bdd3ebdd46776ba48ee3ca009e3023a0
I don't care if the dialog closes or stays open, but if it stays
open then the focus should stay in the dialog.

Pressing enter poses a problem with chrome during cypress tests
with CDP where the form submission default isn't blocked as it
is normally. So added a bodge around for that so the issue can
be property tested.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I5e241ea91f7467643b4a9c63eb1ea045df8527fa
@caolanm caolanm force-pushed the private/caolan/treeview_focus_and_selection25 branch from 5de63bd to b64755d Compare March 25, 2026 21:29
@caolanm caolanm requested a review from eszkadev March 26, 2026 10:51
@caolanm
Copy link
Copy Markdown
Contributor Author

caolanm commented Mar 26, 2026

I'd like to backport this to 25.04, the original review was #15123

@github-project-automation github-project-automation Bot moved this from To Review to To Test in Collabora Online Mar 26, 2026
@eszkadev eszkadev merged commit fd08ed4 into distro/collabora/co-25.04 Mar 26, 2026
10 checks passed
@eszkadev eszkadev deleted the private/caolan/treeview_focus_and_selection25 branch March 26, 2026 13:36
@github-project-automation github-project-automation Bot moved this from To Test to Done in Collabora Online Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants