[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Tue Jul 28 15:06:49 UTC 2020


 loleaflet/src/control/Control.Toolbar.js |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 49e19c2baebf593d6873f207f1a4829b9d98979a
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Jul 28 10:08:37 2020 +0200
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Tue Jul 28 17:06:30 2020 +0200

    Use more reliable approach to show close button
    
    Sometimes using Chrome browser close button is not
    shown after calling show(): replace it with css
    modification which seems to be more reliable.
    
    Also don't show close button on mobile devices where
    we have hamburger menu.
    
    Change-Id: Id354374f18e24fcbdd9afb3894c40cccfe2811ea
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99573
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Henry Castro <hcastro at collabora.com>

diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index bb7776109..634e8bf32 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -1054,12 +1054,12 @@ function setupToolbar(e) {
 	map.on('commandresult', onCommandResult);
 	map.on('updateparts pagenumberchanged', onUpdateParts);
 
-	if (map.options.wopi && L.Params.closeButtonEnabled) {
-		$('#closebuttonwrapper').show();
+	if (map.options.wopi && L.Params.closeButtonEnabled && !window.mode.isMobile()) {
+		$('#closebuttonwrapper').css('display', 'block');
 	} else if (!L.Params.closeButtonEnabled) {
 		$('#closebuttonwrapper').hide();
 	} else if (L.Params.closeButtonEnabled && !window.mode.isMobile()) {
-		$('#closebuttonwrapper').show();
+		$('#closebuttonwrapper').css('display', 'block');
 	}
 
 	$('#closebutton').click(function() {


More information about the Libreoffice-commits mailing list