{"action":"created","issue":{"url":"https://api.github.com/repos/DDMAL/diva.js/issues/282","labels_url":"https://api.github.com/repos/DDMAL/diva.js/issues/282/labels{/name}","comments_url":"https://api.github.com/repos/DDMAL/diva.js/issues/282/comments","events_url":"https://api.github.com/repos/DDMAL/diva.js/issues/282/events","html_url":"https://github.com/DDMAL/diva.js/issues/282","id":102263304,"number":282,"title":"Use feature detection for mobile support","user":{"login":"wabain","id":7651435,"avatar_url":"https://avatars.githubusercontent.com/u/7651435?v=3","gravatar_id":"","url":"https://api.github.com/users/wabain","html_url":"https://github.com/wabain","followers_url":"https://api.github.com/users/wabain/followers","following_url":"https://api.github.com/users/wabain/following{/other_user}","gists_url":"https://api.github.com/users/wabain/gists{/gist_id}","starred_url":"https://api.github.com/users/wabain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wabain/subscriptions","organizations_url":"https://api.github.com/users/wabain/orgs","repos_url":"https://api.github.com/users/wabain/repos","events_url":"https://api.github.com/users/wabain/events{/privacy}","received_events_url":"https://api.github.com/users/wabain/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DDMAL/diva.js/labels/Cross-browser%20compatibility","name":"Cross-browser compatibility","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-20T23:57:45Z","updated_at":"2015-08-21T15:31:01Z","closed_at":null,"body":"Following up on today's [other issues](https://github.com/DDMAL/diva.js/pull/281) with mobile support...\r\n\r\nCurrently mobile support is enabled whenever `window.orientation` is defined, which AFAICT isn't the case for Internet Explorer or Gecko based user agents. Where it makes sense, those should be supported as well.\r\n\r\nMost of the uses of the `window.orientation` test are concerned with touch events. Those should probably be detecting those directly, particularly given the introduction of touch-enabled desktop devices.\r\n\r\nThe uses that don't concern touch events are:\r\n\r\n 1. [This iPad-specific problem](https://github.com/DDMAL/diva.js/blob/350b34044bb0b621ff0e51df4c33bc8289947260/source/js/diva.js#L1264) ([original issue](https://github.com/DDMAL/diva.js/issues/163)) with margin sizing.\r\n 2. This [iOS-specific issue](https://github.com/DDMAL/diva.js/commit/8c3095c50ab797301b6c5aacf88e83edeb83267a) with images sizes in the canvas plugin\r\n 3. A \"[a temporary (but possibly indefinite) solution](https://github.com/DDMAL/diva.js/issues/99)\" for putting up a spinner while loading on mobile devices, also in the canvas plugin\r\n 4. Whatever [`blockMobileMove`](https://github.com/DDMAL/diva.js/blob/350b34044bb0b621ff0e51df4c33bc8289947260/source/js/diva.js#L35) is supposed to do, maybe. @magoni and I aren't really sure what that's for.\r\n\r\nItems 1 and 2 could keep using `window.orientation` (although there might be a neater Apple-specific test). The others uses would probably benefit from testing something more general."},"comment":{"url":"https://api.github.com/repos/DDMAL/diva.js/issues/comments/133463666","html_url":"https://github.com/DDMAL/diva.js/issues/282#issuecomment-133463666","issue_url":"https://api.github.com/repos/DDMAL/diva.js/issues/282","id":133463666,"user":{"login":"ahankinson","id":163183,"avatar_url":"https://avatars.githubusercontent.com/u/163183?v=3","gravatar_id":"","url":"https://api.github.com/users/ahankinson","html_url":"https://github.com/ahankinson","followers_url":"https://api.github.com/users/ahankinson/followers","following_url":"https://api.github.com/users/ahankinson/following{/other_user}","gists_url":"https://api.github.com/users/ahankinson/gists{/gist_id}","starred_url":"https://api.github.com/users/ahankinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahankinson/subscriptions","organizations_url":"https://api.github.com/users/ahankinson/orgs","repos_url":"https://api.github.com/users/ahankinson/repos","events_url":"https://api.github.com/users/ahankinson/events{/privacy}","received_events_url":"https://api.github.com/users/ahankinson/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T15:31:01Z","updated_at":"2015-08-21T15:31:01Z","body":"Are touch events and mouse events different in Javascript?"}}