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

Search Block: Button styles don't save when placed inside a Navigation block #53038

Closed
ndiego opened this issue Jul 27, 2023 · 9 comments · Fixed by #54823
Closed

Search Block: Button styles don't save when placed inside a Navigation block #53038

ndiego opened this issue Jul 27, 2023 · 9 comments · Fixed by #54823
Assignees
Labels
[Block] Search Affects the Search Block - used to display a search field [Type] Bug An existing feature does not function as intended

Comments

@ndiego
Copy link
Member

ndiego commented Jul 27, 2023

Description

If you place a Search block inside of a menu in a Navigation block, then set the block to "Button only" (or any other option besides "Button inside"), the style is not persisted when the Navigation menu is saved. The Search block reverts to "Button inside". See the gif below.

Step-by-step reproduction instructions

  1. Create a Navigation menu
  2. Save the Navigation menu
  3. Add a Search block to the menu
  4. Set the Search block to "Button only" (or any other option besides "Button inside")
  5. Save the Navigation menu and see that the Search block is no longer set to "Button only"

Screenshots, screen recording, code snippet

search-block

Environment info

  • WordPress 6.3 RC2

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

@ndiego ndiego added [Type] Bug An existing feature does not function as intended [Block] Search Affects the Search Block - used to display a search field labels Jul 27, 2023
@ndiego
Copy link
Member Author

ndiego commented Jul 27, 2023

cc @getdave I think you have been working on Navigation. Any ideas here?

@ndiego ndiego changed the title Search Block: Button styles do no save when placed inside a Navigation block Search Block: Button styles don't save when placed inside a Navigation block Jul 27, 2023
@getdave
Copy link
Contributor

getdave commented Jul 27, 2023

@scruffian wasn't this a bug you and I were looking into at one point? It was to do with random effects in the search block firing?

Did we miss a backport?

@tellthemachines
Copy link
Contributor

Is this a duplicate of #51713? In any case, I can reproduce it in 6.2.2 so it's not a 6.3 regression.

@ndiego
Copy link
Member Author

ndiego commented Jul 28, 2023

Is this a duplicate of #51713? In any case, I can reproduce it in 6.2.2 so it's not a 6.3 regression.

And apparently, I commented on that issue!?! 😅 That said, I am still able to replicate in Gutenberg 16.3, so the linked PR did not resolve the issue even though it is closed.

As for 6.3, since this issue is present in 6.2 and therefore not a regression, let's punt.

@wayneconnor
Copy link

Is there a work around for this in the meantime?

@ramonjd
Copy link
Member

ramonjd commented Sep 25, 2023

I couldn't reproduce this specific issue in Chrome, Edge, Firefox or Safari but was experiencing some other strange behaviour. When trying to add text to an empty search block rich text field I couldn't at all. It would bounce focus away from the button.

2023-09-25.13.14.56.mp4

@tellthemachines
Copy link
Contributor

I can reproduce the issue only when first adding a Search block in a Nav block; saving and reloading or even just switching to code view and back restores the expected behaviour.

search-in-nav.mov

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Sep 26, 2023
@getdave
Copy link
Contributor

getdave commented Sep 27, 2023

@ramonjd @tellthemachines I have a PR for review 🙏

@ramonjd
Copy link
Member

ramonjd commented Sep 27, 2023

Thanks for tracking it down @getdave !

@mikachan mikachan removed the [Status] In Progress Tracking issues with work in progress label Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Search Affects the Search Block - used to display a search field [Type] Bug An existing feature does not function as intended
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants