loleaflet/src/control/Control.Menubar.js | 10 ++++++++++ 1 file changed, 10 insertions(+)
New commits: commit f6db27343ff9eabe484a07382b2f67f5193ff63c Author: Andras Timar <andras.ti...@collabora.com> AuthorDate: Tue Aug 18 14:17:38 2020 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Tue Aug 18 16:18:41 2020 +0200 polyfill endsWidth for IE11 Change-Id: I4a2d3af2ccffdc7dcd79ff24e00c909bc57d365e Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100916 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index c6b20a6ff..5ea9a8500 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -1437,6 +1437,16 @@ L.Control.Menubar = L.Control.extend({ if (menuItem.drawing === false && this._map.getDocType() === 'drawing') return false; + // polyfill endsWidth for IE11 + if (!String.prototype.endsWith) { + String.prototype.endsWith = function(search, thisLen) { + if (thisLen === undefined || thisLen > this.length) { + thisLen = this.length; + } + return this.substring(thisLen - search.length, thisLen) === search; + }; + } + if (menuItem.id === 'downloadas-odg' && !this._map['wopi'].BaseFileName.endsWith('.odg')) return false; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits