{"action":"created","issue":{"url":"https://api.github.com/repos/vaadin/vaadin-context-menu/issues/45","repository_url":"https://api.github.com/repos/vaadin/vaadin-context-menu","labels_url":"https://api.github.com/repos/vaadin/vaadin-context-menu/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/vaadin/vaadin-context-menu/issues/45/comments","events_url":"https://api.github.com/repos/vaadin/vaadin-context-menu/issues/45/events","html_url":"https://github.com/vaadin/vaadin-context-menu/issues/45","id":194975631,"number":45,"title":"Contextmenu does not respect right click coordinates","user":{"login":"Mika83AC","id":3017748,"avatar_url":"https://avatars.githubusercontent.com/u/3017748?v=3","gravatar_id":"","url":"https://api.github.com/users/Mika83AC","html_url":"https://github.com/Mika83AC","followers_url":"https://api.github.com/users/Mika83AC/followers","following_url":"https://api.github.com/users/Mika83AC/following{/other_user}","gists_url":"https://api.github.com/users/Mika83AC/gists{/gist_id}","starred_url":"https://api.github.com/users/Mika83AC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mika83AC/subscriptions","organizations_url":"https://api.github.com/users/Mika83AC/orgs","repos_url":"https://api.github.com/users/Mika83AC/repos","events_url":"https://api.github.com/users/Mika83AC/events{/privacy}","received_events_url":"https://api.github.com/users/Mika83AC/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-12T13:35:05Z","updated_at":"2016-12-12T17:34:32Z","closed_at":null,"body":"Assuming this is a webcomponent template using the vaadin-context-menu:\r\n\r\n```\r\n<template>\r\n\t<div id=\"container\"></div>\r\n\r\n\t<vaadin-context-menu id=\"contextmenu\">\r\n\t\t<template>\r\n\t\t\t<paper-menu on-iron-select=\"_onContextMenuClick\">\r\n\t\t\t\t<paper-item id=\"new\">New</paper-item>\r\n\t\t\t</paper-menu>\r\n\t\t</template>\r\n\t</vaadin-context-menu>\r\n</template>\r\n```\r\n\r\nWhen adding elements to the div \"container\" and adding a listener to the \"mousedown\" event by:\r\n\r\n```\r\nvar currentElement = document.createElement('span');\r\ncurrentElement.innerHTML = \"test\";\r\nPolymer.dom(this.$.container).appendChild(currentElement);\r\n\r\nthis.listen(currentElement, 'mousedown', '_nodeText_onMouseDown');\r\n```\r\n\r\n```\r\n_nodeText_onMouseDown: function(e, detail) {\r\n        if(e.button === 2) {\r\n\t     this.$.contextmenu.open(e);\r\n\t}\r\n}\r\n\r\n```\r\nthe position of the content menu is not the position the mouse right click was executed."},"comment":{"url":"https://api.github.com/repos/vaadin/vaadin-context-menu/issues/comments/266496399","html_url":"https://github.com/vaadin/vaadin-context-menu/issues/45#issuecomment-266496399","issue_url":"https://api.github.com/repos/vaadin/vaadin-context-menu/issues/45","id":266496399,"user":{"login":"platosha","id":247998,"avatar_url":"https://avatars.githubusercontent.com/u/247998?v=3","gravatar_id":"","url":"https://api.github.com/users/platosha","html_url":"https://github.com/platosha","followers_url":"https://api.github.com/users/platosha/followers","following_url":"https://api.github.com/users/platosha/following{/other_user}","gists_url":"https://api.github.com/users/platosha/gists{/gist_id}","starred_url":"https://api.github.com/users/platosha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platosha/subscriptions","organizations_url":"https://api.github.com/users/platosha/orgs","repos_url":"https://api.github.com/users/platosha/repos","events_url":"https://api.github.com/users/platosha/events{/privacy}","received_events_url":"https://api.github.com/users/platosha/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T17:34:32Z","updated_at":"2016-12-12T17:34:32Z","body":"@Mika83AC hello! I’ve tried to reproduce your use case, it works so far: http://jsbin.com/lulexenati/edit?html,output\r\n\r\nIn which browsers you have this issue?\r\n\r\nAlso, just out of curiosity: do you have any special reasons for manual opening with `open` method in the right click listener instead of just wrapping your container with `<vaadin-context-menu>` or setting the container as a listener element (e. g., `this.$.contextmenu.listenOn = this.$.container;`)?"}}
{"actor":{"display_login":"platosha"}}