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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Mar 20 14:59:47 UTC 2019


 loleaflet/src/control/Control.LokDialog.js |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 4f72db7217f7f10965824e4e1df9335e0c460339
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Mar 20 16:55:31 2019 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Wed Mar 20 16:58:38 2019 +0200

    tdf#122544: Disable the 'closemobile' button while tunnelled dialog is showing
    
    Sure, I would have preferred to fix the actual bug instead, but that
    was much harder. See bug report for some notes about what I tried.
    
    Now done for iOS app only (window.ThisIsTheiOSApp), probably should be
    done for any mobile app (window.ThisIsAMobileApp).

diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index a4a23254d..c7917d8cb 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -3,7 +3,7 @@
  * L.Control.LokDialog used for displaying LOK dialogs
  */
 
-/* global $ L Hammer */
+/* global $ L Hammer w2ui */
 L.WinUtil = {
 
 };
@@ -343,6 +343,8 @@ L.Control.LokDialog = L.Control.extend({
 	},
 
 	_launchDialog: function(id, leftTwips, topTwips, width, height, title) {
+		if (window.ThisIsTheiOSApp)
+			w2ui['editbar'].disable('closemobile');
 		this.onCloseCurrentPopUp();
 		var dialogContainer = L.DomUtil.create('div', 'lokdialog', document.body);
 		L.DomUtil.setStyle(dialogContainer, 'padding', '0px');
@@ -528,6 +530,8 @@ L.Control.LokDialog = L.Control.extend({
 	},
 
 	_onDialogClose: function(dialogId, notifyBackend) {
+		if (window.ThisIsTheiOSApp)
+			w2ui['editbar'].enable('closemobile');
 		if (notifyBackend)
 			this._sendCloseWindow(dialogId);
 		$('#' + this._toStrId(dialogId)).remove();


More information about the Libreoffice-commits mailing list