Block Editor: LinkControl: Avoid lingering value properties from previous value #20020
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.
Related: #19827
This pull request seeks to resolve an issue introduced by #19651, where if a link is assigned a value with an associated
title
(or any other supportedvalue
properties), they will be inherited into the next value when the user manually enters a URL. This ties in to related work at #19827, where ideally the suggestion value shapes are made to be consistent. As of #19651, the form submit handler will only assign theurl
property of the next value.Even with separate improvements to make the suggestion value consistent, the changes here may still be valuable as an expression of intent of the next value to only derive settings properties from the previous values, and no other properties.
Testing Instructions:
Verify that a title does not transfer to a newly manually-entered value:
http://example.com