{"action":"created","issue":{"url":"https://api.github.com/repos/duopixel/Method-Draw/issues/16","labels_url":"https://api.github.com/repos/duopixel/Method-Draw/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/duopixel/Method-Draw/issues/16/comments","events_url":"https://api.github.com/repos/duopixel/Method-Draw/issues/16/events","html_url":"https://github.com/duopixel/Method-Draw/pull/16","id":21083987,"number":16,"title":"fixed issue with text input on iOS and iframe","user":{"login":"refractalize","id":123917,"avatar_url":"https://avatars.githubusercontent.com/u/123917?v=3","gravatar_id":"","url":"https://api.github.com/users/refractalize","html_url":"https://github.com/refractalize","followers_url":"https://api.github.com/users/refractalize/followers","following_url":"https://api.github.com/users/refractalize/following{/other_user}","gists_url":"https://api.github.com/users/refractalize/gists{/gist_id}","starred_url":"https://api.github.com/users/refractalize/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/refractalize/subscriptions","organizations_url":"https://api.github.com/users/refractalize/orgs","repos_url":"https://api.github.com/users/refractalize/repos","events_url":"https://api.github.com/users/refractalize/events{/privacy}","received_events_url":"https://api.github.com/users/refractalize/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2013-10-16T14:32:48Z","updated_at":"2015-07-04T11:03:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/duopixel/Method-Draw/pulls/16","html_url":"https://github.com/duopixel/Method-Draw/pull/16","diff_url":"https://github.com/duopixel/Method-Draw/pull/16.diff","patch_url":"https://github.com/duopixel/Method-Draw/pull/16.patch"},"body":"## Bug\r\n\r\nOn iOS Safari, when the Method-Draw component is embedded in an iframe.\r\n\r\n1. On an iPad, go to editor/embedapi.html\r\n2. Select the \"T\" text button and create a new text element\r\n3. The keyboard will pop up ready for input.\r\n4. When typing, no text is entered into the SVG text element.\r\n\r\nThis is due to an outstanding bug in iOS Safari where programmatically focussing on an element in an iframe will render the text input unable to capture text. Obscure yes! But otherwise essential for our application.\r\n\r\nSee also: https://github.com/ftlabs/fastclick/issues/37, http://openradar.appspot.com/radar?id=2523403\r\n\r\n## Fix\r\n\r\nHost the text input outside the iframe, in the main page. The text input works as normal, avoiding the Safari bug.\r\n\r\nThe detects the iframe/iOS environment and creates a new text input in the parent window if necessary. Otherwise it uses the regular `#text` input."},"comment":{"url":"https://api.github.com/repos/duopixel/Method-Draw/issues/comments/118500528","html_url":"https://github.com/duopixel/Method-Draw/pull/16#issuecomment-118500528","issue_url":"https://api.github.com/repos/duopixel/Method-Draw/issues/16","id":118500528,"user":{"login":"refractalize","id":123917,"avatar_url":"https://avatars.githubusercontent.com/u/123917?v=3","gravatar_id":"","url":"https://api.github.com/users/refractalize","html_url":"https://github.com/refractalize","followers_url":"https://api.github.com/users/refractalize/followers","following_url":"https://api.github.com/users/refractalize/following{/other_user}","gists_url":"https://api.github.com/users/refractalize/gists{/gist_id}","starred_url":"https://api.github.com/users/refractalize/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/refractalize/subscriptions","organizations_url":"https://api.github.com/users/refractalize/orgs","repos_url":"https://api.github.com/users/refractalize/repos","events_url":"https://api.github.com/users/refractalize/events{/privacy}","received_events_url":"https://api.github.com/users/refractalize/received_events","type":"User","site_admin":false},"created_at":"2015-07-04T11:03:36Z","updated_at":"2015-07-04T11:03:36Z","body":"Hi, I'd almost forgotten this, so no."}}