Task-list checkboxes now stay clickable when an editor transitions…#308
Merged
Conversation
* fix(core): keep task-item checkbox disabled state in sync with editability The ListItem NodeView set checkbox.disabled once at creation from editor.isEditable. A pure setEditable() flip updates view.editable without a doc change, so ProseMirror never calls the NodeView's update() — a checkbox created while the editor was read-only (e.g. seed content injected before the hero editor goes live) stayed disabled forever, so it couldn't be checked. Sync disabled with editor.isEditable on the 'update' event (emitted by setEditable) and in update(), and remove the listener in destroy(). * chore: changeset for task-checkbox editability fix --------- GitOrigin-RevId: e8327374a503cd677f82d5665ea2bf6598d07e5c
Contributor
There was a problem hiding this comment.
Automated approval from agents-private public-mirror-sync (run: https://github.com/inkeep/agents-private/actions/runs/28215618355). Source of truth is the monorepo; direct edits on inkeep/open-knowledge are overwritten on next sync.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task-list checkboxes now stay clickable when an editor transitions from read-only to editable. The list-item NodeView set the checkbox's
disabledstate once at creation fromeditor.isEditable, but asetEditable()flip updates the view's editable flag without a document change, so ProseMirror never re-renders the NodeView and the staledisabledwas never cleared. A checkbox created while the editor was read-only (for example, content loaded before the editor goes live) stayed permanently uncheckable. The NodeView now keepsdisabledin sync with editability via the editor'supdateevent (whichsetEditable()emits) and on every NodeView update.