summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-06-29 10:36:10 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2021-07-29 14:37:49 +0200
commit56e8d9dbbfb1915e8599f7b1bb24ba502e862198 (patch)
treefc63ffa6a15d1bed9eeb3a63e99e28c4750e8bdf
parent6c7d6924511f3006f64fb9d3eadd289778098571 (diff)
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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119658 Tested-by: Jenkins
-rw-r--r--svtools/source/control/toolbarmenu.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index e3234184e533..b507587fb017 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>
@@ -147,7 +148,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()