Problem with autocompletion of nested tasks (crossed)

Newbie here. I have tried searching, but couldn’t find this mentioned elsewhere. Also, I don’t use any non-core plugins yet.

Problem: When I make an indented/nested to-do list, it looks fine in edit mode, but not in reading mode: it scratches out the nested task even though the box is not ticked.

Steps to reproduce

Make to-do list (Ctrl + enter), write something, hit enter, tab, write something. Mark first task done (Ctrl + enter again), view in reading mode (Ctrl + e).

Expected result

For the first task to be marked complete, but not the second.

Actual result

tasks

Environment

  • Operating system: Windows 10 Home
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v0.13.33
    Installer version: v0.13.31
    Operating system: Windows 10 Home 10.0.19043
    Login status: not logged in
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Safe mode: on

RECOMMENDATIONS:
none

1 Like

this is impossible to achieve

Text decorations are drawn across descendant text elements. This means that if an element specifies a text decoration, then a child element can’t remove the decoration.

Source: text-decoration - CSS: Cascading Style Sheets | MDN

Text decorations are drawn across descendant text elements. This means that if an element specifies a text decoration, then a child element can’t remove the decoration. For example, in the markup <p>This text has <em>some emphasized words</em> in it.</p>, the style rule p { text-decoration: underline; } would cause the entire paragraph to be underlined. The style rule em { text-decoration: none; } would not cause any change; the entire paragraph would still be underlined. However, the rule em { text-decoration: overline; } would cause a second decoration to appear on “some emphasized words”.

1 Like

I don’t know how obsidian is coded, but isn’t it possible to change this - to change the indented task from being a “child” of the above (which creates this bug as you’ve described) to something else? I mean, bullet lists fx. don’t have this problem where one line’s style affects the lower indented ones.

Also, by the way, how can it be “impossible” when it looks right in the preview mode?

I don’t think, to be honest, that it would make sense to change this behavior even if it would be technically possible. Because: isn’t it the essential quality of a task that it can only be regarded as completed if all of its subtasks are completed? So for me, if at all, the only meaningful change in behavior would be that if I tick a task as completed, all its subtasks are automatically ticked as well. But I don’t know if that would be easily possible to achieve - and I am even not sure if I would prefer such a behavior. Usually it is the other way round: after I see that all my subtasks are completed, I can finally mark the main task as completed, too. That subtasks are greyed out but not ticked when I mark the main task as completed is, for me, rather a safeguard against the case where I, by mistake, tick a main task. If then all subtasks would be ticked as well, I wouldn’t be aware anymore that something is still missing…