[Libreoffice-commits] online.git: loleaflet/src
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Fri Mar 27 14:41:06 UTC 2020
loleaflet/src/control/Control.ContextMenu.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 60a3070b6779b5eceb30930164fbd7b5c5c8789e
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Fri Mar 27 15:50:06 2020 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Mar 27 15:40:40 2020 +0100
Avoid 'TypeError: undefined is not an object' in the iOS (and Android?) app
There is no map._clip in the mobile apps as they don't use the
internal clipboard implementation in loleaflet.
Not sure why L.Clipboard.filterExecCopyPaste() needs a check for
window.ThisIsAMobileApp as no L.Clipboard object is ever created in
the mobile apps. (See L.Map.initialize() where this._clip is not
assinged any value in the iOS or Android app cases.)
Change-Id: Ib27ec10463667091e65fd813ceb554e83c0952fb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91221
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/loleaflet/src/control/Control.ContextMenu.js b/loleaflet/src/control/Control.ContextMenu.js
index 055e0aa52..3a429464d 100644
--- a/loleaflet/src/control/Control.ContextMenu.js
+++ b/loleaflet/src/control/Control.ContextMenu.js
@@ -154,7 +154,7 @@ L.Control.ContextMenu = L.Control.extend({
map._docLayer.showAnnotationFromCurrentCell();
} else if (map.getDocType() == 'spreadsheet' && key == '.uno:HideNote') {
map._docLayer.hideAnnotationFromCurrentCell();
- } else if (!map._clip.filterExecCopyPaste(key)) {
+ } else if (map._clip === undefined || !map._clip.filterExecCopyPaste(key)) {
map.sendUnoCommand(key);
// For spelling context menu we need to remove selection
if (spellingContextMenu)
More information about the Libreoffice-commits
mailing list