svx/source/form/fmPropBrw.cxx |    2 ++
 svx/source/inc/fmPropBrw.hxx  |    1 +
 2 files changed, 3 insertions(+)

New commits:
commit cf9f73ae78aa9654064abde8411ea2f921c38354
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Apr 12 16:16:05 2023 +0300
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Wed Apr 12 21:22:47 2023 +0200

    tdf#140730 a11y: Focus form control property dlg when it starts
    
    Make sure the dialog gets focus again when it
    starts after having been welded in
    
        commit 1efeb17837c22499f00299c033ae59ba3910f7d7
        Date:   Mon Nov 4 13:06:04 2019 +0000
    
            weld Property Browser
    
    (Tested with gen, kf5 and on Windows.)
    
    Change-Id: Ie5d28a60b459735d1f1fa4c2d5d679f3d5a27cec
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150284
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index 2609dae2a183..e30f90cf5ecf 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -176,6 +176,7 @@ FmPropBrw::FmPropBrw(const Reference< XComponentContext >& 
_xORB, SfxBindings* _
     , m_bInitialStateChange(true)
     , m_pParent(_pParent)
     , m_nAsyncGetFocusId(nullptr)
+    , m_xDialogBox(m_xBuilder->weld_box("dialog-vbox1"))
     , m_xContainer(m_xBuilder->weld_container("container"))
     , m_xORB(_xORB)
 {
@@ -393,6 +394,7 @@ void FmPropBrw::FillInfo( SfxChildWinInfo& rInfo ) const
 
 IMPL_LINK_NOARG( FmPropBrw, OnAsyncGetFocus, void*, void )
 {
+    m_xDialogBox->child_grab_focus();
     m_nAsyncGetFocusId = nullptr;
 }
 
diff --git a/svx/source/inc/fmPropBrw.hxx b/svx/source/inc/fmPropBrw.hxx
index b33597b24d6c..e5b735c0eee3 100644
--- a/svx/source/inc/fmPropBrw.hxx
+++ b/svx/source/inc/fmPropBrw.hxx
@@ -45,6 +45,7 @@ class FmPropBrw final : public SfxModelessDialogController, 
public SfxController
     weld::Window*   m_pParent;
     ImplSVEvent*    m_nAsyncGetFocusId;
     OUString        m_sLastActivePage;
+    std::unique_ptr<weld::Box> m_xDialogBox;
     std::unique_ptr<weld::Container> m_xContainer;
     css::uno::Reference< css::uno::XComponentContext >
                     m_xInspectorContext;

Reply via email to