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

New commits:
commit 19807d4f31a1f58fe434dfe638e1f3c9a0d8e921
Author:     Szymon Kłos <[email protected]>
AuthorDate: Thu Jul 14 16:51:28 2022 +0200
Commit:     Szymon Kłos <[email protected]>
CommitDate: Tue Jul 26 13:33:38 2022 +0200

    jsdialog: handle grab_focus action
    
    Change-Id: I20ec0ac75dfb6260cdd603f9dec7cd5001cb5650
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137085
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Mert Tumer <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137456
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <[email protected]>

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 0f8a2722bdac..a389e3ab0739 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -75,6 +75,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