{"action":"created","issue":{"url":"https://api.github.com/repos/greensock/GreenSock-JS/issues/88","labels_url":"https://api.github.com/repos/greensock/GreenSock-JS/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/greensock/GreenSock-JS/issues/88/comments","events_url":"https://api.github.com/repos/greensock/GreenSock-JS/issues/88/events","html_url":"https://github.com/greensock/GreenSock-JS/issues/88","id":57602020,"number":88,"title":"Draggable.js: Click event triggered twice in 1.15.1.","user":{"login":"Bragolgirith","id":6455473,"avatar_url":"https://avatars.githubusercontent.com/u/6455473?v=3","gravatar_id":"","url":"https://api.github.com/users/Bragolgirith","html_url":"https://github.com/Bragolgirith","followers_url":"https://api.github.com/users/Bragolgirith/followers","following_url":"https://api.github.com/users/Bragolgirith/following{/other_user}","gists_url":"https://api.github.com/users/Bragolgirith/gists{/gist_id}","starred_url":"https://api.github.com/users/Bragolgirith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bragolgirith/subscriptions","organizations_url":"https://api.github.com/users/Bragolgirith/orgs","repos_url":"https://api.github.com/users/Bragolgirith/repos","events_url":"https://api.github.com/users/Bragolgirith/events{/privacy}","received_events_url":"https://api.github.com/users/Bragolgirith/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-13T14:04:30Z","updated_at":"2015-02-15T08:43:44Z","closed_at":null,"body":"I've just updated to the latest release (1.15.1) and noticed that sometimes click events get handled twice. \r\nCodepen: http://codepen.io/anon/pen/wBygrL. \r\n\r\nIt seems that this is caused by these new lines in Draggable.js (1348-1354):\r\n\r\n    if (originalEvent.target.click) { //some browsers (like mobile Safari) don't properly trigger the click event\r\n\t    originalEvent.target.click();\r\n    } else if (_doc.createEvent) {\r\n\t    syntheticEvent = _doc.createEvent(\"MouseEvents\");\r\n\t    syntheticEvent.initEvent(\"click\", true, true);\r\n\t    originalEvent.target.dispatchEvent(syntheticEvent);\r\n    }\r\n\r\nNot sure how to fix it yet, but it might be worth reverting these changes, as they might break existing code (at least in my case they do). "},"comment":{"url":"https://api.github.com/repos/greensock/GreenSock-JS/issues/comments/74409101","html_url":"https://github.com/greensock/GreenSock-JS/issues/88#issuecomment-74409101","issue_url":"https://api.github.com/repos/greensock/GreenSock-JS/issues/88","id":74409101,"user":{"login":"jackdoyle","id":2389714,"avatar_url":"https://avatars.githubusercontent.com/u/2389714?v=3","gravatar_id":"","url":"https://api.github.com/users/jackdoyle","html_url":"https://github.com/jackdoyle","followers_url":"https://api.github.com/users/jackdoyle/followers","following_url":"https://api.github.com/users/jackdoyle/following{/other_user}","gists_url":"https://api.github.com/users/jackdoyle/gists{/gist_id}","starred_url":"https://api.github.com/users/jackdoyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackdoyle/subscriptions","organizations_url":"https://api.github.com/users/jackdoyle/orgs","repos_url":"https://api.github.com/users/jackdoyle/repos","events_url":"https://api.github.com/users/jackdoyle/events{/privacy}","received_events_url":"https://api.github.com/users/jackdoyle/received_events","type":"User","site_admin":false},"created_at":"2015-02-15T08:43:44Z","updated_at":"2015-02-15T08:43:44Z","body":"Ah yes, good catch. Gotta love how differently various browsers behave and all the workarounds necessary to get consistent behavior! We can't remove that other code because it actually resolves a problem in some other browsers (like iOS) that cause it to not dispatch any click event whatsoever. Not to worry, though - I think I've got it patched up in the upcoming release. I posted it in response to a different question in the forums here: http://greensock.com/forums/topic/11272-draggable-snap-points/?p=45931 so you can snag it there and try it out. "}}