sfx2/source/sidebar/FocusManager.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 6113d5dc45232b602bee0e68cf7560d0b8656546 Author: Rafael Lima <rafael.palma.l...@gmail.com> AuthorDate: Thu Jun 27 22:59:47 2024 +0200 Commit: Rafael Lima <rafael.palma.l...@gmail.com> CommitDate: Mon Jul 15 20:57:43 2024 +0200 tdf#161782 Focus document when Esc is pressed in the Gallery/Navigator When Esc is pressed on a Panel that has no visible title, move focus to the document. Change-Id: Ib5571dbd9f8a37017e21d2e01e7b546eb2330751 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169668 Reviewed-by: Jim Raykowski <rayk...@gmail.com> Reviewed-by: Rafael Lima <rafael.palma.l...@gmail.com> Tested-by: Jenkins diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx index e86de2b7de6a..806ac3d3a823 100644 --- a/sfx2/source/sidebar/FocusManager.cxx +++ b/sfx2/source/sidebar/FocusManager.cxx @@ -298,10 +298,12 @@ bool FocusManager::HandleKeyEvent( } case PC_PanelContent: // Return focus to tab bar sidebar settings button or panel title. - if (!IsDeckTitleVisible() && maPanels.size() == 1) + if ((!IsDeckTitleVisible() && maPanels.size() == 1) || + (!maPanels[aLocation.mnIndex]->GetTitleBar()->GetVisible())) FocusButton(0); else FocusPanel(aLocation.mnIndex, true); + bConsumed = true; break; default: