loleaflet/src/control/Control.LokDialog.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit 1a4c8f8dd3254a75744693770bca1ab12a75443f 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> (cherry picked from commit de8974a8161f5acdcf08ddbf7bde55541b6d4bfb) Reviewed-on: https://gerrit.libreoffice.org/48813 Reviewed-by: pranavk <pran...@collabora.co.uk> Tested-by: pranavk <pran...@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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits