loleaflet/src/map/Map.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 2a66a65c7516794e3d37320e86603ef6cf7d638a Author: Henry Castro <hcas...@collabora.com> AuthorDate: Thu Feb 6 08:23:46 2020 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Thu Feb 6 15:00:39 2020 +0100 loleaflet: mobile: add event listener 'resize' Since no longer it is used 'iframe' element ensure to add event listener 'resize' of the window object Change-Id: I89d301ddaf9e5f26c9cbf0c87c8ee157fe77247b Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88099 Reviewed-by: Henry Castro <hcas...@collabora.com> Tested-by: Henry Castro <hcas...@collabora.com> diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 3ffc476ae..e7a75f205 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -1097,8 +1097,10 @@ L.Map = L.Evented.extend({ this._mainEvents(onOff); - if (this.options.trackResize && this._resizeDetector && this._resizeDetector.contentWindow) { - L.DomEvent[onOff](this._resizeDetector.contentWindow, 'resize', this._onResize, this); + if (this.options.trackResize) { + var winTarget = this._resizeDetector && this._resizeDetector.contentWindow ? this._resizeDetector.contentWindow : + window; + L.DomEvent[onOff](winTarget, 'resize', this._onResize, this); } L.DomEvent[onOff](window, 'blur', this._onLostFocus, this); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits