diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-03-03 21:32:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-03 21:32:42 +0100 |
commit | db2fd71868e7cca5c4f38d11884c6117112b4c6e (patch) | |
tree | d9adda7feb48e3af1bb1eee55df4b2b38838a5f0 | |
parent | 47cbb421616016ed1980dd05d3e8ceef6d1592fa (diff) | |
parent | d388921186baa7dcaaf03a206f9be1e648a58548 (diff) | |
download | nextcloud-server-db2fd71868e7cca5c4f38d11884c6117112b4c6e.tar.gz nextcloud-server-db2fd71868e7cca5c4f38d11884c6117112b4c6e.zip |
Merge pull request #31427 from nextcloud/backport/31372/stable23
[stable23] prevent default right-click options when hideDownload is enabled
-rw-r--r-- | apps/files_sharing/js/public.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 3aa4ed78890..ec99d51d34e 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -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) { |