{"action":"created","issue":{"url":"https://api.github.com/repos/mathquill/mathquill/issues/469","labels_url":"https://api.github.com/repos/mathquill/mathquill/issues/469/labels{/name}","comments_url":"https://api.github.com/repos/mathquill/mathquill/issues/469/comments","events_url":"https://api.github.com/repos/mathquill/mathquill/issues/469/events","html_url":"https://github.com/mathquill/mathquill/issues/469","id":107909316,"number":469,"title":"[dev] Typing broken LaTeX command crashes the editor","user":{"login":"robinwassen","id":302151,"avatar_url":"https://avatars.githubusercontent.com/u/302151?v=3","gravatar_id":"","url":"https://api.github.com/users/robinwassen","html_url":"https://github.com/robinwassen","followers_url":"https://api.github.com/users/robinwassen/followers","following_url":"https://api.github.com/users/robinwassen/following{/other_user}","gists_url":"https://api.github.com/users/robinwassen/gists{/gist_id}","starred_url":"https://api.github.com/users/robinwassen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robinwassen/subscriptions","organizations_url":"https://api.github.com/users/robinwassen/orgs","repos_url":"https://api.github.com/users/robinwassen/repos","events_url":"https://api.github.com/users/robinwassen/events{/privacy}","received_events_url":"https://api.github.com/users/robinwassen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-23T12:31:03Z","updated_at":"2015-09-23T12:39:08Z","closed_at":null,"body":"A regression has appeared sometime between July 8 and now that causes the editor to crash if you enter a broken LaTeX command into a MathField.\r\n\r\n**Steps to reproduce:**\r\n1. Initialize a MathField using jQuery 1.11.0 and latest dev\r\n2. Focus the MathField and input \\brokencmd and press enter\r\n3. Press backspace to delete the command\r\n\r\n**Outcome:**\r\n\r\n\r\nThe following error is written to the console:\r\n\r\n```\r\nmathquill.js:648 Uncaught TypeError: el.focus is not a function\r\n```\r\n\r\nAfter that the MathField is totally broken and you cannot interact with it, generating errors such as:\r\n\r\n```\r\nmathquill.js:1600 Uncaught TypeError: cursor.hide(...).parent.blur is not a function\r\nmathquill.js:614 Uncaught TypeError: this.parent.focus is not a function_.show @ mathquill.js:614(anonymous function) @ mathquill.js:1584n.event.dispatch @ jquery.min.js:3r.handle @ jquery.min.js:3\r\nmathquill.js:614 Uncaught TypeError: this.parent.focus is not a function_.show @ mathquill.js:614_.seek @ mathquill.js:2159(anonymous function) @ mathquill.js:2132n.event.dispatch @ jquery.min.js:3r.handle @ jquery.min.js:3\r\nmathquill.js:1600 Uncaught TypeError: cursor.hide(...).parent.blur is not a function\r\n```\r\n\r\n**The test page I used:**\r\n\r\n```\r\n<html>\r\n<head>\r\n\t<link rel=\"stylesheet\" href=\"./build/mathquill.css\"/>\r\n\t<script src=\"./build/jquery.min.js\"></script>\r\n\t<script src=\"./build/mathquill.js\"></script>\r\n\t<script>\r\n\t\tvar mq, f;\r\n\t\t$(function() {\r\n\t\t\tf = $('.math-field');\r\n\t\t\tmq = MathQuill.MathField(f[0]);\r\n\t\t\tmq.write(\"f(x) =\");\r\n\t\t});\r\n\t</script>\r\n</head>\r\n<body>\r\n\t<div class=\"math-field\" style=\"padding: 10px; border: 1px solid #000\"></div>\r\n</body>\r\n</html>\r\n```"},"comment":{"url":"https://api.github.com/repos/mathquill/mathquill/issues/comments/142585919","html_url":"https://github.com/mathquill/mathquill/issues/469#issuecomment-142585919","issue_url":"https://api.github.com/repos/mathquill/mathquill/issues/469","id":142585919,"user":{"login":"robinwassen","id":302151,"avatar_url":"https://avatars.githubusercontent.com/u/302151?v=3","gravatar_id":"","url":"https://api.github.com/users/robinwassen","html_url":"https://github.com/robinwassen","followers_url":"https://api.github.com/users/robinwassen/followers","following_url":"https://api.github.com/users/robinwassen/following{/other_user}","gists_url":"https://api.github.com/users/robinwassen/gists{/gist_id}","starred_url":"https://api.github.com/users/robinwassen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robinwassen/subscriptions","organizations_url":"https://api.github.com/users/robinwassen/orgs","repos_url":"https://api.github.com/users/robinwassen/repos","events_url":"https://api.github.com/users/robinwassen/events{/privacy}","received_events_url":"https://api.github.com/users/robinwassen/received_events","type":"User","site_admin":false},"created_at":"2015-09-23T12:39:08Z","updated_at":"2015-09-23T12:39:08Z","body":"Did some closer research and found that it is deleting broken LaTeX commands that actually causes the problem, so I would guess that this regression was introduced in the changes August the 6th."}}