Repository navigation
fix(image): persist dialog changes in nested editors - #994
Merged
petyosi merged 2 commits intoOct 13, 2026
Merged
Conversation
Synchronize nested editors after image insertion and editing commits, so table cells do not depend on another blur to save dialog changes. Add component regressions for URL and async uploads, image editing, cancellation, root/directive editors, and reload, plus a focused browser fixture.
|
🎉 This PR is included in version 4.3.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Fixes #991.
Problem
An image inserted through ImageDialog can exist in a table cell's Lexical state while
getMarkdown()andonChangestill omit it. Opening the dialog has already moved focus out of that cell, so moving directly to another cell after saving does not provide another blur to synchronize the image.Changes
bug-991example and a focused Playwright regression. The example's reload button remounts the editor from the saved Markdown.Verification
On unchanged main
122347c, the final focused suite has four expected failures: new URL insertion with cell/root navigation, asynchronous upload, and nested directive insertion. The same nine cases pass with this change. The assertions inspectgetMarkdown()andonChangebefore moving focus, so an extra blur cannot rescue the test.Passed locally:
npm run typechecknpm run lintnpm run test:once -- --maxWorkers=1 --minWorkers=1: 131 passed; the existing 1 skipped and 1 todo remainnpm run buildnpm run test:lexical-versions: 24 packages at 0.48.0npm run build:docs:api(existing TypeDoc warnings)git diff --checkBrowser and package verification
Current fork CI passed all four existing jobs for exact head
336ed63a6c08c7a24355a28b508847334f200c6d:0.35 input → packed 0.48 output → published 4.0.4/0.35 reader) passed.The initial browser run passed 98/99 cases. WebKit also renders a src-less
imgas a Lexical managed linebreak, so the test's bareimglocator matched two elements. The follow-up scopes the assertion to content images with a source and requires exactly one, preserving the URL, saved Markdown, and reload checks. Production code was unchanged for that follow-up.Local native-browser execution was unavailable, so the browser and package-runtime results above come from the standard GitHub-hosted runner. Upstream CI for this head still awaits maintainer approval. The PR remains draft.
This change does not alter pending-upload cancellation semantics, clipboard/drop insertion, or the separate nested-JSX import work in #989.