{"action":"closed","issue":{"url":"https://api.github.com/repos/sourcelair/xterm.js/issues/28","labels_url":"https://api.github.com/repos/sourcelair/xterm.js/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/sourcelair/xterm.js/issues/28/comments","events_url":"https://api.github.com/repos/sourcelair/xterm.js/issues/28/events","html_url":"https://github.com/sourcelair/xterm.js/issues/28","id":92624158,"number":28,"title":"Fire double backspace event in Safari","user":{"login":"alexeyfrank","id":1286315,"avatar_url":"https://avatars.githubusercontent.com/u/1286315?v=3","gravatar_id":"","url":"https://api.github.com/users/alexeyfrank","html_url":"https://github.com/alexeyfrank","followers_url":"https://api.github.com/users/alexeyfrank/followers","following_url":"https://api.github.com/users/alexeyfrank/following{/other_user}","gists_url":"https://api.github.com/users/alexeyfrank/gists{/gist_id}","starred_url":"https://api.github.com/users/alexeyfrank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexeyfrank/subscriptions","organizations_url":"https://api.github.com/users/alexeyfrank/orgs","repos_url":"https://api.github.com/users/alexeyfrank/repos","events_url":"https://api.github.com/users/alexeyfrank/events{/privacy}","received_events_url":"https://api.github.com/users/alexeyfrank/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-02T12:29:40Z","updated_at":"2015-11-16T12:07:52Z","closed_at":"2015-11-16T12:07:52Z","body":"Hi, I found a bug in Safari. When I press backspace, \"keypress\" event fired in Safari. But in Chrome this event is not fired. \r\n\r\nWe can fix it in keyPress function:\r\n\r\n```\r\n\r\n     if (ev.charCode) {\r\n       key = ev.charCode;\r\n     } else if (ev.which == null) {\r\n       key = ev.keyCode;\r\n     } else if (ev.which !== 0 && ev.charCode !== 0) {\r\n       key = ev.which;\r\n     } else {\r\n       return false;\r\n     }\r\n\r\n    // fix backspace in Safari\r\n    if (key === 8) {\r\n      return false;\r\n    }\r\n\r\n```"}}