Skip to content

Commit ddd2af2

Browse files
authored
Merge pull request #3145 from obsidian-tasks-group/fix-live-preview-on-completion-delete
fix: 'on completion' delete now renders correctly in Live Preview
2 parents cbaf649 + a76abe3 commit ddd2af2

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/Obsidian/LivePreviewExtension.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,6 @@ class LivePreviewExtension implements PluginValue {
9090
});
9191
this.view.dispatch(transaction);
9292

93-
// Dirty workaround.
94-
// While the code in this method properly updates the `checked` state
95-
// of the target checkbox, some Obsidian internals revert the state.
96-
// This means that the checkbox would remain in its original `checked`
97-
// state (`true` or `false`), even though the underlying document
98-
// updates correctly.
99-
// As a "fix", we set the checkbox's `checked` state *again* after a
100-
// timeout to revert Obsidian's wrongful reversal.
101-
const desiredCheckedStatus = target.checked;
102-
setTimeout(() => {
103-
target.checked = desiredCheckedStatus;
104-
}, 1);
105-
10693
return true;
10794
}
10895
}

0 commit comments

Comments
 (0)