         if not task?
             return
         e = task.element
-        if e.hasClass('salvus-task-editing-desc')
+        if e.hasClass('salvus-task-editing-desc') and e.data('cm')?
+            e.data('cm').focus()
             return
         e.find(".salvus-task-toggle-icons").hide()
         e.addClass('salvus-task-editing-desc')

                        @_last_search = t
                        @render_task_list()
                setTimeout(f, search_delay)

        @element.find(".salvus-tasks-search-clear").click () =>
            e = @element.find(".salvus-tasks-search")

task_template           = templates.find(".salvus-task")
edit_task_template      = templates.find(".salvus-task-editor")
hashtag_button_template = templates.find(".salvus-tasks-hashtag-button")

currently_focused_editor = undefined

exports.task_list = (project_id, filename) ->
    element = templates.find(".salvus-tasks-editor").clone()
