[Libreoffice-commits] online.git: loleaflet/src
Pranav Kant
pranavk at collabora.co.uk
Mon Jan 29 09:17:43 UTC 2018
loleaflet/src/control/Control.LokDialog.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit cb6c9461e08717216ba33398e1e28b0be6b54838
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Thu Jan 25 20:02:32 2018 +0530
loleaflet: Don't try to paint if floating window has vanished
Change-Id: I9284c7ec73f6f0e900d3efa2d055eb8b7d5303b2
Reviewed-on: https://gerrit.libreoffice.org/48620
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
(cherry picked from commit 3e4a78ccc3410b16fe6b34eea23720f551f53383)
Reviewed-on: https://gerrit.libreoffice.org/48814
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 c2b57c2e..308819a6 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -305,7 +305,10 @@ L.Control.LokDialog = L.Control.extend({
_paintDialogChild: function(dialogId, width, height, rectangle, imgData) {
var strDlgId = this._toDlgPrefix(dialogId);
var img = new Image();
- var canvas = document.getElementById(strDlgId + '-floating');
+ var canvas = L.DomUtil.get(strDlgId + '-floating');
+ if (!canvas)
+ return; // no floating window to paint to
+
canvas.width = width;
canvas.height = height;
var ctx = canvas.getContext('2d');
More information about the Libreoffice-commits
mailing list