summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2022-07-14 16:51:28 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2022-07-21 10:22:52 +0200
commit8742557ec4e4361fe726c6274cd01afa3a8ea080 (patch)
tree4e2707eddc8fa90f6093344cd02edd49941cca84
parent9ab3be6bc0848e44f88ae157c7e8323335246897 (diff)
jsdialog: handle grab_focus action
Change-Id: I20ec0ac75dfb6260cdd603f9dec7cd5001cb5650 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137085 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com>
-rw-r--r--vcl/jsdialog/executor.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index b0c350b76522..d23c1299ade2 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -74,6 +74,12 @@ bool ExecuteAction(const std::string& nWindowId, const OString& rWidget, StringM
if (pWidget != nullptr)
{
+ if (sAction == "grab_focus")
+ {
+ pWidget->grab_focus();
+ return true;
+ }
+
if (sControlType == "tabcontrol")
{
auto pNotebook = dynamic_cast<weld::Notebook*>(pWidget);