obsidian-tasks icon indicating copy to clipboard operation
obsidian-tasks copied to clipboard

Triggering "Toggle task done" on an empty line does not move the cursor to the end of the line

Open jdudleyie opened this issue 3 years ago • 2 comments

Expected Behavior

When triggering "toggle task done" command on an empty line, when the - plus a space character is inserted, expect the cursor to also be moved to the end of the line (after the space character) so that one could immediately start typing the bullet point text.

Likewise, when triggering "toggle task done" for a second time (twice in a row on an empty line), when the - followed by a space changes to - [ ] followed by a space, expect the cursor to be moved to the end of the line, so that the task title could be typed without the user needing to move the cursor there.

The built in command toggle checklist status appears to have the correct behaviour.

Current Behavior

In the two scenarios above, the cursor remains at the beginning (leftmost position) of the line.

Steps to Reproduce

On an empty line, in edit or live preview mode, trigger the command "Tasks: Toggle task done" once or twice.

Context (Environment)

  • Obsidian version: 0.13.14
  • Tasks version: 1.4.1
  • [x] I have tried it with all other plugins disabled and the error still occurs

jdudleyie avatar Dec 23 '21 23:12 jdudleyie

Thank you for the report @jdudleyie. I can reproduce this. I think this regression was introduced with CM6, but I am not sure.

schemar avatar Jan 02 '22 12:01 schemar

I find both these issues too

JenFau avatar Feb 25 '22 16:02 JenFau

This fix was just released in Tasks 1.13.1

claremacrae avatar Sep 05 '22 21:09 claremacrae