From 6911ac40f668895089d4ae4de90edba95e283433 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 23 Nov 2020 11:37:09 +0000 Subject: tdf#137662 set focus in combo/list box on click backport the part of commit d2f1cd004310b9ea6654d17fddc11cb08e884c90 Date: Fri Jun 26 20:57:29 2020 +0100 that sets the correct focus on click Change-Id: Ia053925f5e541642720892dfe2edc27995e84a61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106414 Tested-by: Jenkins Reviewed-by: Christian Lohmaier --- include/svtools/editbrowsebox.hxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index 5614659d0756..04c931d82fdd 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -339,6 +339,13 @@ namespace svt public: ComboBoxControl(vcl::Window* pParent); + virtual void GetFocus() override + { + if (m_xWidget) + m_xWidget->grab_focus(); + InterimItemWindow::GetFocus(); + } + weld::ComboBox& get_widget() { return *m_xWidget; } // sets a link to call when the selection is changed by the user @@ -400,6 +407,13 @@ namespace svt public: ListBoxControl(vcl::Window* pParent); + virtual void GetFocus() override + { + if (m_xWidget) + m_xWidget->grab_focus(); + InterimItemWindow::GetFocus(); + } + weld::ComboBox& get_widget() { return *m_xWidget; } // sets a link to call when the selection is changed by the user -- cgit