{"action":"created","issue":{"url":"https://api.github.com/repos/docdis/range-touch/issues/2","labels_url":"https://api.github.com/repos/docdis/range-touch/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/docdis/range-touch/issues/2/comments","events_url":"https://api.github.com/repos/docdis/range-touch/issues/2/events","html_url":"https://github.com/docdis/range-touch/issues/2","id":42823791,"number":2,"title":"iOS Safari errors","user":{"login":"otheroom","id":302410,"avatar_url":"https://avatars.githubusercontent.com/u/302410?v=3","gravatar_id":"","url":"https://api.github.com/users/otheroom","html_url":"https://github.com/otheroom","followers_url":"https://api.github.com/users/otheroom/followers","following_url":"https://api.github.com/users/otheroom/following{/other_user}","gists_url":"https://api.github.com/users/otheroom/gists{/gist_id}","starred_url":"https://api.github.com/users/otheroom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otheroom/subscriptions","organizations_url":"https://api.github.com/users/otheroom/orgs","repos_url":"https://api.github.com/users/otheroom/repos","events_url":"https://api.github.com/users/otheroom/events{/privacy}","received_events_url":"https://api.github.com/users/otheroom/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2014-09-15T21:59:54Z","updated_at":"2015-08-11T08:01:33Z","closed_at":"2015-06-23T22:25:16Z","body":"I'm using range-touch in a project and it's been working great overall. I have however noticed some errors being reported when I do remove debugging in the iOS Simulator and iOS devices.\r\n\r\n```\r\n[Error] TypeError: 'undefined' is not an object (evaluating 'e.touches[0]')\r\n```\r\n\r\nIn my code I've got a listener that updates a variable to track the actual element that's been clicked (or tapped).\r\n\r\n```javascript\r\nvar clickedElement;\r\ndocument.addEventListener('mousedown', setClickElement);\r\ndocument.addEventListener('touchmove', setClickElement);\r\nsetClickElement = function(e) {\r\n\tclickedElement = $(e.target);\r\n};\r\n```\r\n\r\nThe reported error occurs on Line 64: \r\n\r\n```javascript\r\nfirstTouch = _isPointerType ? e : e.touches[0]\r\n```\r\n\r\nThis doesn't seem to be causing and problems so far but I thought I'd report it. I'm not seeing this in desktop Safari or desktop Chrome."},"comment":{"url":"https://api.github.com/repos/docdis/range-touch/issues/comments/129750788","html_url":"https://github.com/docdis/range-touch/issues/2#issuecomment-129750788","issue_url":"https://api.github.com/repos/docdis/range-touch/issues/2","id":129750788,"user":{"login":"bakman2","id":333960,"avatar_url":"https://avatars.githubusercontent.com/u/333960?v=3","gravatar_id":"","url":"https://api.github.com/users/bakman2","html_url":"https://github.com/bakman2","followers_url":"https://api.github.com/users/bakman2/followers","following_url":"https://api.github.com/users/bakman2/following{/other_user}","gists_url":"https://api.github.com/users/bakman2/gists{/gist_id}","starred_url":"https://api.github.com/users/bakman2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakman2/subscriptions","organizations_url":"https://api.github.com/users/bakman2/orgs","repos_url":"https://api.github.com/users/bakman2/repos","events_url":"https://api.github.com/users/bakman2/events{/privacy}","received_events_url":"https://api.github.com/users/bakman2/received_events","type":"User","site_admin":false},"created_at":"2015-08-11T08:01:33Z","updated_at":"2015-08-11T08:01:33Z","body":"btw; I am using dynamically added elements. "}}