Skip to content

FormTokenField: Suggestion is expanded on load when __experimentalExpandOnFocus is set to true #42528

@dinhtungdu

Description

@dinhtungdu

Description

If __experimentalExpandOnFocus is set for <FormTokenField> component, the suggestion list is expanded after page load without any user interaction.

Step-by-step reproduction instructions

  1. Add the following story to packages/components/src/form-token-field/stories/index.tsx:
export const ExpandOnFocus: ComponentStory< typeof FormTokenField > =
	DefaultTemplate.bind( {} );
ExpandOnFocus.args = {
	...Default.args,
	__experimentalExpandOnFocus: true,
};
  1. See suggestion list is expanded without focusing on the token input field.

Note: The DropdownSelector story in #42527 can be used for testing this issue.

Screenshots, screen recording, code snippet

Screen.Recording.2022-07-19.at.17.35.12.mov

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Package] Components/packages/components[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions