FormTokenField: Fix token overflow when moving cursor left or right#52662
Merged
FormTokenField: Fix token overflow when moving cursor left or right#52662
Conversation
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.
What?
This PR fixes a problem in the
FormTokenFieldcomponent where tokens protrude from the input element when the cursor is moved between (or at the beginning of) tokens.before.mp4
after.mp4
Why?
This is because this component does not have
box-sizing:border-box. However, this problem does not occur in the sidebar of a post, for example, because thebox-sizingis reset.gutenberg/packages/edit-post/src/style.scss
Lines 59 to 65 in 33bf984
gutenberg/packages/base-styles/_mixins.scss
Lines 344 to 352 in 33bf984
Testing Instructions