     hash = window.location.hash.replace /^#/, ''
     tryLoading hash
     false
+
+  keepFocus = () ->
+    $editorCode.focus()
 
   wantsToSave = (evt) ->
     metaKey = evt.ctrlKey

    $list.hide()
    $linenosCode.html "Esc - #{metaKeyName}+s - Shift+#{metaKeyName}+s".replace /(.)/g, '$1<br>'
    $editorCode.html(content).attr('contentEditable', 'true').focus()
    $editor.addClass('editing')
    $body.off 'keydown', disableSave
    $body.on 'keydown', maybeSave

      lines = lines.split ''
    $linenosCode.html lines.join '<br>'
    $editorCode.html(content).attr 'contentEditable', 'false'
    $editorCode.off 'blur', keepFocus
    $editor.removeClass('editing')
    $body.on 'dblclick', startEditing
    $body.on 'keydown', maybeCancelEditing
