diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-06-29 10:36:10 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-06-29 12:08:55 +0200 |
commit | 6635ef91491bab4737c9897091c9104356440870 (patch) | |
tree | f80cf0335742f43db2702b0747fde8632b0df70e | |
parent | sidebar: unify LineWidthPopup with other WeldToolbarPopups (diff) | |
download | core-6635ef91491bab4737c9897091c9104356440870.tar.gz core-6635ef91491bab4737c9897091c9104356440870.zip |
jsdialog: sidebar: don't close popups when first time used
Change-Id: I9a4f96acf44f3503f7bd978883d9d20de528b7bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118073
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r-- | svtools/source/control/toolbarmenu.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index a8f18d60c61c..998af5390693 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -18,6 +18,7 @@ */ #include <memory> +#include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <osl/diagnose.h> @@ -151,7 +152,11 @@ void ToolbarPopupContainer::setPopover(std::unique_ptr<WeldToolbarPopup> xPopup) // move the WeldToolbarPopup contents into this toolbar so on-demand contents can appear inside a preexisting gtk popover // because the arrow for the popover is only enabled if there's a popover set m_xPopup->getTopLevel()->move(m_xPopup->getContainer(), m_xContainer.get()); - m_xPopup->GrabFocus(); + + // in online LoseFocus event is fired due to this line and popup is closed + // when first time opened any popup from not focused sidebar + if (!comphelper::LibreOfficeKit::isActive()) + m_xPopup->GrabFocus(); } void ToolbarPopupContainer::unsetPopover() |