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

New commits:
commit e9ca86de8531aeec7458578ee6e932aae11260ca
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Wed Mar 20 16:55:31 2019 +0200
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Wed Mar 20 17:00:15 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 b8b7d7ed3..0c3ec04c9 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();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to