   [web] Debugging mobile safari crash?
  I am developing a soft-coding environment for the browser, intended to allow development in mobile Safari on the iPad. Along the way, I am implementing a textarea + &#106avascript code editor, since mobile Safari is allergic to standard rich-text/editor controls (it only pops up the keyboard if it encounters a text area, so div/iframe-based editors don't work).One of the challenges I have encountered is providing accurate hard line numbering in a soft-wrapped text element. It appears that no one has succeeded in providing this to date, though there are plenty of failed attempts around the web.I have worked up an initial demo: http://www.darkcoda.com/mobile/edit.htmlThis works across Chrome, Safari, Firefox and IE 8, except that the line numbering breaks for narrow views (resize the window to observe). That is a limitation which can probably be solved with some more tweaking of font metrics, and in any case I can live with it.However, a larger issue is mobile Safari, which despite rendering the line numbers perfectly on load, crashes when attempting to edit the text. I have enabled the error console on my iPad, and it doesn't offer any errors prior to crashing, nor are there any errors when running in the desktop browsers.Would any of you happen to have ideas as to what might cause a crash, when run in an onkeyup handler, that wouldn't crash when run at page load? If I switch the line number update to occur on a .5 second timer, rather than in onkeyup, then mobile safari doesn't crash, but the keyboard will often fail to activate when you try to focus the textarea.   