{"action":"created","issue":{"url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3481","labels_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3481/labels{/name}","comments_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3481/comments","events_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3481/events","html_url":"https://github.com/Leaflet/Leaflet/issues/3481","id":78314446,"number":3481,"title":"contextmenu event doesnt get called for circleMarker on canvas leaflet","user":{"login":"abarik1981","id":6896731,"avatar_url":"https://avatars.githubusercontent.com/u/6896731?v=3","gravatar_id":"","url":"https://api.github.com/users/abarik1981","html_url":"https://github.com/abarik1981","followers_url":"https://api.github.com/users/abarik1981/followers","following_url":"https://api.github.com/users/abarik1981/following{/other_user}","gists_url":"https://api.github.com/users/abarik1981/gists{/gist_id}","starred_url":"https://api.github.com/users/abarik1981/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abarik1981/subscriptions","organizations_url":"https://api.github.com/users/abarik1981/orgs","repos_url":"https://api.github.com/users/abarik1981/repos","events_url":"https://api.github.com/users/abarik1981/events{/privacy}","received_events_url":"https://api.github.com/users/abarik1981/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-20T01:02:46Z","updated_at":"2015-05-20T06:13:26Z","closed_at":null,"body":"Problem: contextmenu event doesnt get called for circleMarker on canvas leaflet\r\n\r\nSteps to reproduce:\r\n\r\n1. create following code:\r\n\r\nhtml header: must contain `L_PREFER_CANVAS=true;`\r\n\r\n    <script>L_PREFER_CANVAS=true;</script>\r\n    <link rel=\"stylesheet\" href=\"http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css\" />\r\n    <script src=\"http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js\"></script>\r\n\r\n    <div id=\"map\"></div>\r\n\r\n\r\njavascript:\r\n\r\n    map = L.map('map', {\r\n        center: [7.2, 40.9],\r\n        zoom: 2\r\n    });\r\n\r\n    L.tileLayer('http://{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', {\r\n        attribution: \"Map: Tiles Courtesy of MapQuest (OpenStreetMap, CC-BY-SA)\",\r\n        subdomains: [\"otile1\", \"otile2\", \"otile3\", \"otile4\"],\r\n        maxZoom: 12,\r\n        minZoom: 2\r\n    }).addTo(map);\r\n\r\n    var marker1 = new L.Marker([1, 1]);\r\n    marker1.on('contextmenu', function() {\r\n         $('body').append('right-clicked-on-marker')\r\n    })\r\n    map.addLayer(marker1);\r\n\r\n    var cmarker1 = new L.circleMarker([1, 20]);\r\n    map.addLayer(cmarker1);\r\n    cmarker1.on('contextmenu', function() {\r\n         $('body').append('right-clicked-on-circle-marker')\r\n    })\r\n\r\n\r\n2. rightclick on simple marker and you will see `right-clicked-on-marker` getting appended to body\r\n\r\n3. rightclick on circle marker and you will NOT see `right-clicked-on-circle-marker` getting appended to body\r\n\r\n4. Tested that if I remove `L_PREFER_CANVAS=true;`, then contextmenu works for circlemarker\r\n\r\njsfiddle: http://jsfiddle.net/abarik/vg7b2ttb/5/\r\n\r\nPlease help\r\n\r\nUsing version: 0.7.3\r\n"},"comment":{"url":"https://api.github.com/repos/Leaflet/Leaflet/issues/comments/103776380","html_url":"https://github.com/Leaflet/Leaflet/issues/3481#issuecomment-103776380","issue_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3481","id":103776380,"user":{"login":"mourner","id":25395,"avatar_url":"https://avatars.githubusercontent.com/u/25395?v=3","gravatar_id":"","url":"https://api.github.com/users/mourner","html_url":"https://github.com/mourner","followers_url":"https://api.github.com/users/mourner/followers","following_url":"https://api.github.com/users/mourner/following{/other_user}","gists_url":"https://api.github.com/users/mourner/gists{/gist_id}","starred_url":"https://api.github.com/users/mourner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mourner/subscriptions","organizations_url":"https://api.github.com/users/mourner/orgs","repos_url":"https://api.github.com/users/mourner/repos","events_url":"https://api.github.com/users/mourner/events{/privacy}","received_events_url":"https://api.github.com/users/mourner/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T06:13:26Z","updated_at":"2015-05-20T06:13:26Z","body":"Can you reproduce the same issue on 1.0-dev (master)? Example of using canvas renderer is on map/debug/vector2.html."}}