     create_task: () =>
         if @readonly
             return
-        p = 0
-        for t in @tasks
-            if t.position < p
-                p = t.position
-        position = p - 1
+
+        # we create the task after the current task
+        p0 = @current_task?.position
+        if p0?
+            # set p1 to the smallest position that is bigger than the position of the current task
+            p1 = undefined
+            for t in @tasks
+                if t.position > p0 and (not p1? or t.position < p1)
+                    p1 = t.position
+            if p1? and p1>p0
+                position = (p0 + p1)/2
+            else
+                position = p0 + 1
+        else
+            # no current task, so just put new task at the very beginning
+            p = 0
+            for t in @tasks
+                if t.position < p
+                    p = t.position
+            position = p - 1
 
         desc = @selected_hashtags().join(' ')
         if desc.length > 0


    edit_desc: (task) =>
        if not task?
            task = @_visible_tasks[0]
        e = task.element
        if e.hasClass('salvus-task-editing-desc')
            return

        if not @current_task?
            task_id = @local_storage("current_task")
            if task_id?
                @set_current_task_by_id(task_id)

        for task in @tasks
            if task.done and not @showing_done
