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

Pranav Kant pranavk at collabora.co.uk
Thu Jan 25 16:10:37 UTC 2018


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

New commits:
commit de8974a8161f5acdcf08ddbf7bde55541b6d4bfb
Author: Pranav Kant <pranavk at 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 <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at 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


More information about the Libreoffice-commits mailing list