| commit | 3bf923428f75506e16a99805c00c1cc8eff28f40 | [log] |
|---|---|---|
| author | Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> | Sat Jun 22 22:04:39 2024 +0300 |
| committer | Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> | Tue Jun 25 08:10:04 2024 +0200 |
| tree | 7af8466799b03a14c11d9290bed99f45d8834b61 | |
| parent | b7bec979f2602bad759b4e018284c2779f215c00 [diff] |
tdf#161743 Calc Sidebar Functions deck: move focus to document upon Esc while in empty search field Change-Id: I7bb6aaeb69712b293c74bfcf34ab65c4869c860c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169352 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> (cherry picked from commit 1f26aa7f42795aed775646cbb616f5ee4e60326c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169442 Reviewed-by: Jim Raykowski <raykowj@gmail.com>
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx index 355a820..96df210 100644 --- a/sc/source/ui/formdlg/dwfunctr.cxx +++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -443,6 +443,20 @@ IMPL_LINK(ScFunctionWin, KeyInputHdl, const KeyEvent&, rEvent, bool) break; case KEY_ESCAPE: { // Escape in an empty search field should move focus to the document, // adhering to Sidebar guidelines if (m_xSearchString->get_text().isEmpty()) { if (SfxViewShell* pCurSh = SfxViewShell::Current()) { vcl::Window* pShellWnd = pCurSh->GetWindow(); if (pShellWnd) pShellWnd->GrabFocusToDocument(); } bHandled = true; break; } m_xSearchString->set_text(u""_ustr); UpdateFunctionList(u""_ustr); bHandled = true;