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

New commits:
commit 4f72db7217f7f10965824e4e1df9335e0c460339
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 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();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to