[BUGFIX][1.2] Fix for moving element - #197
Merged
Merged
Conversation
This reverts commit 714242f.
GSadee
approved these changes
Jul 21, 2026
Contributor
|
QA results: |
GSadee
added a commit
that referenced
this pull request
Jul 22, 2026
| Q | A | --------------- | ----- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | completion of #197 | License | MIT A live delete can leave a stray collection entry with an empty type behind (the DOM row is not always removed before the form is submitted). Such an entry has no resolvable configuration form, which would raise "This form should not contain extra fields". Drop these entries before the collection binds them, so deletion results in the intended, valid state. This Pull Request also contains Behat improvements.
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.
There was 2 bugs (see video).
Bug-Capture-aF9s-8IPDna317y3fe3JbM51kjmGifKiO3w0GohwWQs-.webm
Bug-Capture-G9h7N-adIeRdn-FVFc9nkbAbtD-CIvOUHydfaq-EoSSF.webm
Problem:
Reordering content elements works by swapping values between fixed positions in the collection on the server side, after which the page is refreshed by Symfony UX LiveComponent, which patches the DOM in place.
Whenever the content/type at a given position changed, the morphing tried to turn one element's widget into another's within the same DOM node.
Fix
Append a signature of the element's content to the config container's id. As a result, when the content at a position changes (reorder), the id changes too - LiveComponent replaces the whole subtree instead of morphing it in place - the widget is recreated from the correct, server-rendered value. Works the same for trix and quill, with no JS changes.