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

New commits:
commit d9d2e4b1c1b660e4727edd21b0c83b7534b6171c
Author:     Attila Szűcs <attila.sz...@collabora.com>
AuthorDate: Wed May 3 04:46:20 2023 +0200
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Fri May 5 09:38:00 2023 +0200

    LOK: Navi-6 page selector SpinField
    
    Grab the focus back to the spinfield in sidebar, so the document will
    be able to scroll to the right page.
    It seems there is a condition check, on move to page, that focus must be
    not on document, or else it does not move.
    AFAIK in lok code we dont try to simulate the focus of the core,
    but maybe we should, for cases like this.
    
    Change-Id: Ie9a30e6bd944cfa1729861eb0ac1924b946f4185
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151309
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Tested-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index a178d60fc2c3..737ae2f961b9 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -311,6 +311,10 @@ bool ExecuteAction(const std::string& nWindowId, const 
OString& rWidget, StringM
                     if (rData["data"] == "undefined")
                         return true;
 
+                    // The Document will not scroll if that is in focus
+                    // maybe we could send a message with: sAction == 
"grab_focus"
+                    pWidget->grab_focus();
+
                     double nValue = o3tl::toDouble(rData["data"]);
                     pSpinField->set_value(nValue
                                           * 
weld::SpinButton::Power10(pSpinField->get_digits()));

Reply via email to