[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src
Andras Timar (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 18 13:22:23 UTC 2020
loleaflet/src/control/Control.Menubar.js | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 9fcd0ec196a3acfbb5486566878bcf7eac6e8839
Author: Andras Timar <andras.timar at collabora.com>
AuthorDate: Tue Aug 18 14:17:38 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Tue Aug 18 15:22:04 2020 +0200
polyfill endsWidth for IE11
Change-Id: I4a2d3af2ccffdc7dcd79ff24e00c909bc57d365e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100807
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index bb868473f..4fe7ba101 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -1387,6 +1387,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;
More information about the Libreoffice-commits
mailing list