[Mobile] Bug 37604: don't show context menu by long tap
This commit is contained in:
parent
471c7f5db5
commit
7f79f37804
|
@ -577,6 +577,8 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
me.applyLicense();
|
me.applyLicense();
|
||||||
|
|
||||||
|
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
|
||||||
},
|
},
|
||||||
|
|
||||||
onLicenseChanged: function(params) {
|
onLicenseChanged: function(params) {
|
||||||
|
@ -1200,6 +1202,18 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onContextMenu: function(event){
|
||||||
|
var canCopyAttr = event.target.getAttribute('data-can-copy'),
|
||||||
|
isInputEl = (event.target instanceof HTMLInputElement) || (event.target instanceof HTMLTextAreaElement);
|
||||||
|
|
||||||
|
if ((isInputEl && canCopyAttr === 'false') ||
|
||||||
|
(!isInputEl && canCopyAttr !== 'true')) {
|
||||||
|
event.stopPropagation();
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.',
|
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.',
|
||||||
defaultTitleText: 'ONLYOFFICE Document Editor',
|
defaultTitleText: 'ONLYOFFICE Document Editor',
|
||||||
criticalErrorTitle: 'Error',
|
criticalErrorTitle: 'Error',
|
||||||
|
|
|
@ -531,6 +531,8 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
me.applyLicense();
|
me.applyLicense();
|
||||||
|
|
||||||
|
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
|
||||||
},
|
},
|
||||||
|
|
||||||
onLicenseChanged: function(params) {
|
onLicenseChanged: function(params) {
|
||||||
|
@ -1154,6 +1156,18 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onContextMenu: function(event){
|
||||||
|
var canCopyAttr = event.target.getAttribute('data-can-copy'),
|
||||||
|
isInputEl = (event.target instanceof HTMLInputElement) || (event.target instanceof HTMLTextAreaElement);
|
||||||
|
|
||||||
|
if ((isInputEl && canCopyAttr === 'false') ||
|
||||||
|
(!isInputEl && canCopyAttr !== 'true')) {
|
||||||
|
event.stopPropagation();
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// Translation
|
// Translation
|
||||||
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.',
|
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.',
|
||||||
defaultTitleText: 'ONLYOFFICE Presentation Editor',
|
defaultTitleText: 'ONLYOFFICE Presentation Editor',
|
||||||
|
|
|
@ -547,7 +547,9 @@ define([
|
||||||
|
|
||||||
$('.view-main').on('click', function (e) {
|
$('.view-main').on('click', function (e) {
|
||||||
uiApp.closeModal('.document-menu.modal-in');
|
uiApp.closeModal('.document-menu.modal-in');
|
||||||
})
|
});
|
||||||
|
|
||||||
|
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
|
||||||
},
|
},
|
||||||
|
|
||||||
onLicenseChanged: function(params) {
|
onLicenseChanged: function(params) {
|
||||||
|
@ -1320,6 +1322,18 @@ define([
|
||||||
if (url) this.iframePrint.src = url;
|
if (url) this.iframePrint.src = url;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onContextMenu: function(event){
|
||||||
|
var canCopyAttr = event.target.getAttribute('data-can-copy'),
|
||||||
|
isInputEl = (event.target instanceof HTMLInputElement) || (event.target instanceof HTMLTextAreaElement);
|
||||||
|
|
||||||
|
if ((isInputEl && canCopyAttr === 'false') ||
|
||||||
|
(!isInputEl && canCopyAttr !== 'true')) {
|
||||||
|
event.stopPropagation();
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.',
|
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.',
|
||||||
defaultTitleText: 'ONLYOFFICE Spreadsheet Editor',
|
defaultTitleText: 'ONLYOFFICE Spreadsheet Editor',
|
||||||
criticalErrorTitle: 'Error',
|
criticalErrorTitle: 'Error',
|
||||||
|
|
Loading…
Reference in a new issue