Merge pull request #31428 from nextcloud/backport/31372/stable22

[stable22] prevent default right-click options when hideDownload is enabled
This commit is contained in:
Vincent Petry 2022-03-03 21:32:54 +01:00 committed by GitHub
commit 676b48f89a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,6 +50,14 @@ OCA.Sharing.PublicApp = {
var token = $('#sharingToken').val();
var hideDownload = $('#hideDownload').val();
// Prevent all right-click options if hideDownload is enabled
if (hideDownload === 'true') {
window.oncontextmenu = function(event) {
event.preventDefault();
event.stopPropagation();
return false;
};
}
// file list mode ?
if ($el.find('#filestable').length) {