Skip to content

B-TG7K-obsidian-md-embed-task-toggle-attribution

State: promoted/task

Split out of B-S2FC-obsidian-md-review-findings finding #9, “Nested renderer mounted with no event listeners — every interaction inside a transclusion is swallowed”, while fixing it in T-8H57-obsidian-md-review-bug-triage.

ObsidianEmbed now forwards link-click, link-hover and tag-click from the nested <ObsidianMarkdown> up to the host. task-toggle is deliberately not forwarded. Its payload is { line, checked }, and that line belongs to the embedded note — and is relative to the slice sliceEmbed handed the nested renderer, not even to that note’s file. Every host reads it as a line of the note it is displaying: solutions/determined/experiences/notes/app/components/NotesNoteView.vue calls toggleTaskLine on its own body. Forwarding it would make a click inside a transclusion rewrite the wrong file at the wrong line, which is worse than the swallowed click it replaces.

So a checkbox inside a transclusion is inert today. Making it work needs two things the payload does not carry: the embedded note’s path, and the offset of the slice within that note’s source (the below-the-cap “slice-relative data-line inside embeds” item from the same review). Both are ObsidianEmbed’s to supply.

Pinned by packages/ts/obsidian-md/test/embeds.test.ts, “a task toggle inside a transclusion does NOT reach the host” — that test asserts today’s containment and will need rewriting to the new contract when this is fixed.


← Back to Backlog