vcl/jsdialog/executor.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 8742557ec4e4361fe726c6274cd01afa3a8ea080
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Thu Jul 14 16:51:28 2022 +0200
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Thu Jul 21 10:22:52 2022 +0200

    jsdialog: handle grab_focus action
    
    Change-Id: I20ec0ac75dfb6260cdd603f9dec7cd5001cb5650
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137085
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Mert Tumer <mert.tu...@collabora.com>

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);

Reply via email to