sc/source/ui/cctrl/checklistmenu.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit b2dc515e2a3c8420c7f39c0b4396632c2086126a Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri May 17 21:05:56 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sat May 18 14:02:35 2024 +0200 Related: tdf#146326 restore correct focus when on submenu launched we still "cancel" a submenu if it never gets around to getting launched so at least set the restore focus wiget to where we initially grab focus. Change-Id: Ida157823a282d08ca908c20f0135db61881adb7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167798 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 1d720cb3b0dd..45202de94fb4 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -686,11 +686,15 @@ ScCheckListMenuControl::ScCheckListMenuControl(weld::Widget* pParent, ScViewData void ScCheckListMenuControl::GrabFocus() { if (mxEdSearch->get_visible()) + { mxEdSearch->grab_focus(); + meRestoreFocus = RestoreFocus::EdSearch; + } else { mxMenu->set_cursor(0); mxMenu->grab_focus(); + meRestoreFocus = RestoreFocus::Menu; } }