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@gmail.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
This commit is contained in:
Michael Meeks 2020-02-13 04:47:38 +00:00 committed by Andras Timar
parent 1bc1034543
commit 6543ad21bb

View file

@ -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) {