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

Inserter: Pattern Category Selection Removes Pattern Tab #60972

Closed
jeryj opened this issue Apr 22, 2024 · 4 comments · Fixed by #61002
Closed

Inserter: Pattern Category Selection Removes Pattern Tab #60972

jeryj opened this issue Apr 22, 2024 · 4 comments · Fixed by #61002
Assignees
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Type] Bug An existing feature does not function as intended

Comments

 @jeryj
Copy link
Contributor

Description

I believe this is due to the pattern category entering zoom-out mode which selects a root block.

Step-by-step reproduction instructions

  1. Open main Block Inserter
  2. Click Pattern Tab
  3. Click a Pattern Category
  4. Click Block Tab
  5. Click Pattern Tab
  6. Click Pattern Category
  7. Bug: Pattern Category disappears and focus returns to Block tab

Screenshots, screen recording, code snippet

Screen.Recording.2024-04-22.at.3.35.21.PM.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

 @jeryj jeryj added the [Type] Bug An existing feature does not function as intended label Apr 22, 2024
 @jeryj
Copy link
Contributor Author

jeryj commented Apr 22, 2024

@draganescu @ajlende - maybe caused by #60909 or was it already there?

Update: It was already there.

 @Mamaduka Mamaduka added the [Feature] Inserter The main way to insert blocks using the + button in the editing interface label Apr 23, 2024
 @Mamaduka
Copy link
Member

This also affects the "Media" tab. After the Patterns tab is gone, the Media tab renders no content, and it's no longer displayed when toggling the inserter.

The issue only affects the Site Editor.

Screencast

CleanShot.2024-04-23.at.10.27.14.mp4

 @draganescu
Copy link
Contributor

It was there before #60909 afaik, and the reason is the zoom out mode auto trigger which does something. I can investigate the cause.

 @draganescu draganescu self-assigned this Apr 23, 2024
 @draganescu
Copy link
Contributor

  • I doesn't happen when editing pages, only when editing templates
  • it's a block selection issue, I am uncertain what we should do because currently having a header selected in a page will result in an empty inserter
  • for patterns what happens is that when switching to zoom out mode in templates the section root is selected, but when switching out the root element is selected.

We should always select the section root if there is no selection.

Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants