{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust-playpen/issues/164","labels_url":"https://api.github.com/repos/rust-lang/rust-playpen/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust-playpen/issues/164/comments","events_url":"https://api.github.com/repos/rust-lang/rust-playpen/issues/164/events","html_url":"https://github.com/rust-lang/rust-playpen/pull/164","id":122523982,"number":164,"title":"Show an alert before unload the page","user":{"login":"fcsonline","id":135988,"avatar_url":"https://avatars.githubusercontent.com/u/135988?v=3","gravatar_id":"","url":"https://api.github.com/users/fcsonline","html_url":"https://github.com/fcsonline","followers_url":"https://api.github.com/users/fcsonline/followers","following_url":"https://api.github.com/users/fcsonline/following{/other_user}","gists_url":"https://api.github.com/users/fcsonline/gists{/gist_id}","starred_url":"https://api.github.com/users/fcsonline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fcsonline/subscriptions","organizations_url":"https://api.github.com/users/fcsonline/orgs","repos_url":"https://api.github.com/users/fcsonline/repos","events_url":"https://api.github.com/users/fcsonline/events{/privacy}","received_events_url":"https://api.github.com/users/fcsonline/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-12-16T15:08:24Z","updated_at":"2015-12-17T23:52:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust-playpen/pulls/164","html_url":"https://github.com/rust-lang/rust-playpen/pull/164","diff_url":"https://github.com/rust-lang/rust-playpen/pull/164.diff","patch_url":"https://github.com/rust-lang/rust-playpen/pull/164.patch"},"body":"If you are playing with Rust and you leave accidentally the page you will\r\nlose all your work if you have not save it. This could be annoying. Just\r\nshow an alert to confirm that."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust-playpen/issues/comments/165618464","html_url":"https://github.com/rust-lang/rust-playpen/pull/164#issuecomment-165618464","issue_url":"https://api.github.com/repos/rust-lang/rust-playpen/issues/164","id":165618464,"user":{"login":"enricostano","id":748971,"avatar_url":"https://avatars.githubusercontent.com/u/748971?v=3","gravatar_id":"","url":"https://api.github.com/users/enricostano","html_url":"https://github.com/enricostano","followers_url":"https://api.github.com/users/enricostano/followers","following_url":"https://api.github.com/users/enricostano/following{/other_user}","gists_url":"https://api.github.com/users/enricostano/gists{/gist_id}","starred_url":"https://api.github.com/users/enricostano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enricostano/subscriptions","organizations_url":"https://api.github.com/users/enricostano/orgs","repos_url":"https://api.github.com/users/enricostano/repos","events_url":"https://api.github.com/users/enricostano/events{/privacy}","received_events_url":"https://api.github.com/users/enricostano/received_events","type":"User","site_admin":false},"created_at":"2015-12-17T23:52:25Z","updated_at":"2015-12-17T23:52:25Z","body":"One of the root causes of this IMO is that clicking on play button moves the focus out of the code textarea. Then if you hit a key like backspace (thinking that you're still editing the code) some browser will land you back in the browser history. Maybe a first improvement would be to restore the focus to the code area after compiling and showing the result."}}