Skip to content

fix: ignore delayed field changes on removed nodes - #1789

Open
sridharkalaibala wants to merge 1 commit into
josdejong:developfrom
sridharkalaibala:fix/detached-field-change
Open

sridharkalaibala wants to merge 1 commit into
josdejong:developfrom
sridharkalaibala:fix/detached-field-change

Conversation

@sridharkalaibala

Copy link
Copy Markdown

Renaming an object key and immediately calling editor.update() with replacement data can remove that node before its debounced field-change callback runs. The callback then dereferences this.parent.getInternalPath() with a null parent and throws.

Ignore the delayed field change when the node no longer has a parent, following the approach suggested in #1498. A regression test schedules the real debounce and removes the node before it fires; a second test confirms attached-node edits still record their action and previous field value.

Validation: npm run build-and-test passes (build, 71 tests, StandardJS lint). Actual Chromium reproduction dispatches a key-edit input event and immediately calls editor.update({ replacement: 42 }): original bundle throws the reported null-parent error; rebuilt bundle produces no page error and preserves the replacement data. Diff check passes. Prepared with AI assistance and locally verified.

Fixes #1498.

@josdejong

Copy link
Copy Markdown
Owner

Thanks Shridhar for the PR's and issues that you've opened. I'm not sure when I can look into them but will keep you posted.

@sridharkalaibala

Copy link
Copy Markdown
Author

Thanks for the update, Jos. I appreciate you keeping me informed. I’ll leave the existing PRs ready for when you have review time and follow up on any questions or requested changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Cannot read properties of null (reading 'getInternalPath')"

2 participants