{"action":"created","issue":{"url":"https://api.github.com/repos/contao/core/issues/7501","labels_url":"https://api.github.com/repos/contao/core/issues/7501/labels{/name}","comments_url":"https://api.github.com/repos/contao/core/issues/7501/comments","events_url":"https://api.github.com/repos/contao/core/issues/7501/events","html_url":"https://github.com/contao/core/issues/7501","id":51214723,"number":7501,"title":"patched mediabox.js inconsistent regarding contextmenu","user":{"login":"fritzmg","id":4970961,"avatar_url":"https://avatars.githubusercontent.com/u/4970961?v=3","gravatar_id":"","url":"https://api.github.com/users/fritzmg","html_url":"https://github.com/fritzmg","followers_url":"https://api.github.com/users/fritzmg/followers","following_url":"https://api.github.com/users/fritzmg/following{/other_user}","gists_url":"https://api.github.com/users/fritzmg/gists{/gist_id}","starred_url":"https://api.github.com/users/fritzmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fritzmg/subscriptions","organizations_url":"https://api.github.com/users/fritzmg/orgs","repos_url":"https://api.github.com/users/fritzmg/repos","events_url":"https://api.github.com/users/fritzmg/events{/privacy}","received_events_url":"https://api.github.com/users/fritzmg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/contao/core/labels/defect","name":"defect","color":"bd2c00"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/contao/core/milestones/98","labels_url":"https://api.github.com/repos/contao/core/milestones/98/labels","id":871666,"number":98,"title":"3.2.17","description":"Contao 3.2.17 (bugfix release)","creator":{"login":"leofeyer","id":1192057,"avatar_url":"https://avatars.githubusercontent.com/u/1192057?v=3","gravatar_id":"","url":"https://api.github.com/users/leofeyer","html_url":"https://github.com/leofeyer","followers_url":"https://api.github.com/users/leofeyer/followers","following_url":"https://api.github.com/users/leofeyer/following{/other_user}","gists_url":"https://api.github.com/users/leofeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/leofeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leofeyer/subscriptions","organizations_url":"https://api.github.com/users/leofeyer/orgs","repos_url":"https://api.github.com/users/leofeyer/repos","events_url":"https://api.github.com/users/leofeyer/events{/privacy}","received_events_url":"https://api.github.com/users/leofeyer/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":17,"state":"open","created_at":"2014-11-18T18:45:03Z","updated_at":"2015-01-21T10:17:11Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2014-12-07T11:10:03Z","updated_at":"2015-01-21T10:17:11Z","closed_at":"2015-01-21T10:17:11Z","body":"Contao's version of the mediabox.js adds the following patch, to enable the contextmenu on image links by default:\r\n```JavaScript\r\n// PATCH: enable the contextmenu\r\n//links.addEvent('contextmenu', function(e){\r\n//\tif (this.toString().match(/\\.gif|\\.jpg|\\.jpeg|\\.png/i)) e.stop();\r\n//});\r\n// PATCH EOF\r\n```\r\nHowever, the contextmenu on the actual image is still disabled. In order to enable it, the following line (#900) needs to be disabled:\r\n```JavaScript\r\npreload.addEvent('mousedown', function(e){ e.stop(); }).addEvent('contextmenu', function(e){ e.stop(); });\r\n```\r\n\r\nBut may be it would be better to upgrade the mediabox to its newest version. mediabox 1.5.x introduces this option:\r\n```JavaScript\r\nclickBlock: true, // Adds an event on right-click to block saving of images from the context menu in most browsers (this can't prevent other ways of downloading, but works as a casual deterent).\r\n```\r\nWhen `clickBlock` is false, both the already patched part and the part I mentioned will be disabled.\r\n"},"comment":{"url":"https://api.github.com/repos/contao/core/issues/comments/70813669","html_url":"https://github.com/contao/core/issues/7501#issuecomment-70813669","issue_url":"https://api.github.com/repos/contao/core/issues/7501","id":70813669,"user":{"login":"leofeyer","id":1192057,"avatar_url":"https://avatars.githubusercontent.com/u/1192057?v=3","gravatar_id":"","url":"https://api.github.com/users/leofeyer","html_url":"https://github.com/leofeyer","followers_url":"https://api.github.com/users/leofeyer/followers","following_url":"https://api.github.com/users/leofeyer/following{/other_user}","gists_url":"https://api.github.com/users/leofeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/leofeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leofeyer/subscriptions","organizations_url":"https://api.github.com/users/leofeyer/orgs","repos_url":"https://api.github.com/users/leofeyer/repos","events_url":"https://api.github.com/users/leofeyer/events{/privacy}","received_events_url":"https://api.github.com/users/leofeyer/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T10:17:11Z","updated_at":"2015-01-21T10:17:11Z","body":"I have updated the [Contao mediabox component](https://github.com/contao-components/mediabox) accordingly, however, it requires to adjust the `moo_mediabox` template and can therefore only be included in Contao 4.\r\n\r\nSo for Contao 3, I have just commented out line 900 in 46e670f5891baa30ed6753757313f9ba039adc81 to fix the issue."}}