From 8742557ec4e4361fe726c6274cd01afa3a8ea080 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Thu, 14 Jul 2022 16:51:28 +0200 Subject: jsdialog: handle grab_focus action Change-Id: I20ec0ac75dfb6260cdd603f9dec7cd5001cb5650 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137085 Tested-by: Jenkins CollaboraOffice Reviewed-by: Mert Tumer --- vcl/jsdialog/executor.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vcl') 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(pWidget); -- cgit v1.2.3