Repository navigation
[6.x] Fix Bard sets picking up wrong values when splitting a list - #15701
Merged
Merged
Conversation
# Conflicts: # resources/js/tests/components/fieldtypes/bard/BardFieldtype.test.js
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.
Pressing Enter on an empty list item in Bard (which splits the list) could copy a sets values into the set next to it.
The cause is the 150 ms update debounce. Splitting a list moves the sets down, but the debounce keeps the stored value stale for a moment. The sets already look up their values at their new position, so a set can pick up its neighbour's values in that window. Moves like this now skip the debounce. Typing is still debounced.
To reproduce: put a list with an empty item above two sets with a paragraph between them, place the cursor in the empty item and press Enter. The first set now shows the second set's values.
Found while working on #15700. The two fixes are independent, but both add tests to the end of
BardFieldtype.test.js, so whichever lands second needs a quick rebase :)