Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Pattern Modal: Tab focus is lost #66571

Open
2 of 6 tasks
t-hamano opened this issue Oct 29, 2024 · 3 comments
Open
2 of 6 tasks

Create Pattern Modal: Tab focus is lost #66571

t-hamano opened this issue Oct 29, 2024 · 3 comments
Labels
Needs Testing Needs further testing to be confirmed. [Package] Components /packages/components [Type] Bug An existing feature does not function as intended

Comments

@t-hamano
Copy link
Contributor

Description

The "Add New Pattern" modal allows us to select a pattern category that is rendered by the FormTokenField component.

When I press the tab key in this pattern category, I would expect the "Synced" toggle to get focus, but instead the modal disappears and focus is lost.

I have not been able to identify the cause, but I suspect it might be an issue that occurs when the Modal component and the FormTokenField component are used together.

This issue appears to have occurred since WP 6.4, when pattern categories were implemented.

Step-by-step reproduction instructions

  • Select "Create pattern" from a block toolbar.
  • Press the tab key repeatedly.

Screenshots, screen recording, code snippet

6c136c876db49007bb40539666fbec71.mp4

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Package] Components /packages/components labels Oct 29, 2024
@t-hamano
Copy link
Contributor Author

t-hamano commented Nov 4, 2024

I'm closing this as I can no longer reproduce this issue for some reason.

@t-hamano t-hamano closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2024
@t-hamano t-hamano reopened this Jan 21, 2025
@t-hamano
Copy link
Contributor Author

I've somehow managed to reproduce this issue, so I'd be grateful if you could test this in your environment.

@t-hamano t-hamano added the Needs Testing Needs further testing to be confirmed. label Jan 21, 2025
@carolinan
Copy link
Contributor

carolinan commented Jan 22, 2025

I am able to reproduce it:
Windows 11, Chrome Version 132.0.6834.84
I tested it in the Site Editor and block editor.

WP Version 6.7.1 without Gutenberg
WP version 6.7.1 with Gutenberg trunk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Testing Needs further testing to be confirmed. [Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants