[Libreoffice-commits] online.git: loleaflet/src

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Thu Feb 13 06:57:37 UTC 2020


 loleaflet/src/control/Control.ContextMenu.js |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 6543ad21bbeeb23bf96f67a50edceef7053b914d
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Thu Feb 13 04:47:38 2020 +0000
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Feb 13 07:57:18 2020 +0100

    mobile: Delete insertion - use graphic selection rather than clip.
    
    The clipboard population is asynchronous and might come too late.
    Was missing the Delete item on Android.
    
    Change-Id: I05515f151c8d730e2aa1cb61eceacd0c3b90c455
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88579
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/loleaflet/src/control/Control.ContextMenu.js b/loleaflet/src/control/Control.ContextMenu.js
index 9912729ce..9bc7a23c2 100644
--- a/loleaflet/src/control/Control.ContextMenu.js
+++ b/loleaflet/src/control/Control.ContextMenu.js
@@ -157,11 +157,8 @@ L.Control.ContextMenu = L.Control.extend({
 	},
 
 	_amendContextMenuData: function(obj) {
-
-		// Add a 'delete' entry for mobile when selection is ole/image/shape
-		if (this._map._clip && this._map._clip._selectionType === 'complex' &&
-			window.mode.isMobile()) {
-
+		// Add a 'delete' entry for mobile for graphic selection.
+		if (this._map._docLayer.hasGraphicSelection() && window.mode.isMobile()) {
 			var insertIndex = -1;
 			obj.menu.forEach(function(item, index) {
 				if (item.command === '.uno:Paste') {
@@ -174,7 +171,6 @@ L.Control.ContextMenu = L.Control.extend({
 					{ text: _('Delete'), type: 'command', command: '.uno:Delete', enabled: true });
 			}
 		}
-
 	},
 
 	_createContextMenuStructure: function(obj) {


More information about the Libreoffice-commits mailing list