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

New commits:
commit de8974a8161f5acdcf08ddbf7bde55541b6d4bfb
Author: Pranav Kant <pran...@collabora.co.uk>
Date:   Thu Jan 25 21:12:15 2018 +0530

    loleaflet: Ignore callbacks without an active dialog
    
    Change-Id: Ie828309b8a3d9201f5e7071884ec7cadf2cacb21
    Reviewed-on: https://gerrit.libreoffice.org/48621
    Reviewed-by: Jan Holesovsky <ke...@collabora.com>
    Tested-by: Jan Holesovsky <ke...@collabora.com>

diff --git a/loleaflet/src/control/Control.LokDialog.js 
b/loleaflet/src/control/Control.LokDialog.js
index eac2baf0..06d6a527 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -111,7 +111,13 @@ L.Control.LokDialog = L.Control.extend({
                                this._createDialogChild(e.id, parentId, top, 
left);
                                this._sendPaintWindow(e.id, 
this._createRectStr(null, 0, 0, width, height));
                        }
-               } else if (e.action === 'invalidate') {
+               }
+
+               // all other callbacks doens't make sense without an active 
dialog
+               if (!(this._isOpen(e.id) || this._getParentDialog(e.id)))
+                       return;
+
+               if (e.action === 'invalidate') {
                        var parent = this._getParentDialog(e.id);
                        var rectangle = e.rectangle;
                        if (parent) { // this is a floating window
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to