[Libreoffice-commits] online.git: loleaflet/src

Pranav Kant pranavk at collabora.co.uk
Mon Jan 29 09:17:25 UTC 2018


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

New commits:
commit 1a4c8f8dd3254a75744693770bca1ab12a75443f
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>
    (cherry picked from commit de8974a8161f5acdcf08ddbf7bde55541b6d4bfb)
    Reviewed-on: https://gerrit.libreoffice.org/48813
    Reviewed-by: pranavk <pranavk at collabora.co.uk>
    Tested-by: pranavk <pranavk at collabora.co.uk>

diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index 0b3c48ec..c2b57c2e 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