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

Navigation Block: Overlay Z-index nesting issues with consecutive cover blocks #75439

Open
NoHopeRadio opened this issue Apr 7, 2023 · 17 comments
Assignees
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Core Blocks Blocks that come with Gutenberg. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Interaction #] > 10 (Automated) interaction count label for better visibility. Please don't add these manualliy. Navigation [Platform] Atomic [Platform] Simple [Pri] Normal Schedule for the next available opportuinity. [Product] WordPress.com All features accessible on and related to WordPress.com. [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. Triaged To be used when issues have been triaged. [Type] Bug When a feature is broken and / or not performing as intended

Comments

@NoHopeRadio
Copy link

NoHopeRadio commented Apr 7, 2023

This is a core issue: WordPress/gutenberg#45353
Feel free to use this issue for tracking WordPress.com Customer reports. - cuemarie


Quick summary

If a navigation block is nested in a cover block, and there is a cover block after it on the page, the contents of the second cover block will show on top of the navigation overlay.

Both the header and content immediately after are in cover blocks here:
image

In this case, when expanded, the navigation overlay sits underneath the second cover block.
image

If there is an image in the second cover block...
image

...the navigation overlay will overlap the image, but not the overlay or the text.
image

Setting a background color for the cover block creates an opaque overlay, so that does completely cover the navigation section.
image

If the navigation block is not within a cover block...
image

then the overlay loads correctly.
image

Steps to reproduce

  1. Create a navigation menu within a cover block.
  2. Enable the overlay option for the menu.
  3. Create a cover block as the next element on the page, add text and overlay to this block.
  4. Expand Navigation hamburger.

What you expected to happen

The navigation menu should become the top element on the page.

What actually happened

The navigation overlay sits underneath the second cover block's overlay. I believe the z-index settings of the navigation block's parent cover block overlay take precedence over the navigation block's settings here.

Setting the z-index for the cover block's inner content as a number greater than 1 seems to fix the issue. Since this is generally the first cover block on the page, a CSS workaround that might work is:

.wp-block-cover .wp-block-cover__inner-container:first-of-type, .wp-block-cover-image .wp-block-cover__inner-container:first-of-type { 
z-index: 2;
}

Otherwise, a different layout for the second element of the page or the header may be necessary.

Noticed in ticket here:
6174732-zen

Impact

Some (< 50%)

Available workarounds?

Yes, easy to implement

Platform (Simple and/or Atomic)

No response

Logs or notes

No response

@NoHopeRadio NoHopeRadio added [Type] Bug When a feature is broken and / or not performing as intended User Report labels Apr 7, 2023
@github-actions github-actions bot added the [Pri] Low Address when resources are available. label Apr 7, 2023
@github-actions
Copy link

github-actions bot commented Apr 7, 2023

Support References

This comment is automatically generated. Please do not edit it.

  • 6174732-zen
  • 6223970-zen
  • 6737383-zen
  • 7374639-zen
  • 7396302-zen
  • 7707902-zen
  • 7790193-zen
  • 7960428-zen
  • 8164886-zen
  • 8849232-zen
  • 9291659-zen

@cuemarie
Copy link

cuemarie commented Apr 7, 2023

📌 SCRUBBING : RESULT - Replicated / Could Not Replicate / Uncertain

  • Tested on Simple – Replicated
  • Tested on Atomic – Replicated
  • Replicable outside of Dotcom – Yes

📌 FINDINGS/SCREENSHOTS/VIDEO

  • Replicated in all test environments! Even without a second Cover block following the first, it seems like the Navigation Block, when inside of a Cover block, runs into z-index issues in the Editor as well.

Screenshots/Recordings

Nav block OUTSIDE of cover block, in Editor
Markup on 2023-04-07 at 13:46:26

Nav block INSIDE of cover block, in Editor
Markup on 2023-04-07 at 13:47:03

Live Site
Markup on 2023-04-07 at 13:56:09


Nav block INSIDE of cover block, in Editor, no 2nd cover block

  • NOTE - this behavior did not occur on my selfhosted site using Gutenberg 15.5.0, but the issues with other cover blocks (as noted above) did happen there as well.

Markup on 2023-04-07 at 13:48:02

Live Site
Markup on 2023-04-07 at 13:59:02

📌 ACTIONS

@cuemarie cuemarie added [Pri] Normal Schedule for the next available opportuinity. Navigation [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. Triaged To be used when issues have been triaged. Blocks Editor blocks, aka Gutenberg blocks, plugins, and extensions [Platform] Simple [Platform] Atomic and removed [Pri] Low Address when resources are available. labels Apr 7, 2023
@Gustavo-Hilario
Copy link

Another report here: 6223970-zen
Theme: Blank Canvas

I could reproduce this on a test site. In this case, the submenu is getting cut off at the end of the cover block.

Markup 2023-04-25 at 06 24 40

@masperber
Copy link

38262835-hc I had a customer report the same issue that @Gustavo-Hilario reported. That is: when a Navigation Block is nested inside of a Cover Block, the submenu is cut off at the bottom of the Cover Block.

@cuemarie
Copy link

cuemarie commented Sep 6, 2023

Customer report in #81459 :

  • 6737383-zen

@cuemarie cuemarie added Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Product] WordPress.com All features accessible on and related to WordPress.com. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Feature] Core Blocks Blocks that come with Gutenberg. and removed Blocks Editor blocks, aka Gutenberg blocks, plugins, and extensions labels Sep 6, 2023
@cuemarie cuemarie moved this from Needs Triage to Triaged in Automattic Prioritization: The One Board ™ Sep 6, 2023
@the-misha
Copy link

Another customer report: 7374639-zd-a8c

@tvolpert
Copy link

tvolpert commented Dec 2, 2023

another one here: 7396302-zd-a8c. Provided the CSS workaround

@tvolpert
Copy link

tvolpert commented Feb 9, 2024

reported in 7707902-zd-a8c

@rinazrina
Copy link

Another report: 7790193-zd-a8c

@rinazrina
Copy link

Another one: 7960428-zd-a8c

As a workaround, I advised the user to replace the Cover block behind the Nav menu with a Group block. Then add a Background image to the Group block.

@ezebecke
Copy link

Another report on 8164886-zd-a8c

@mrfoxtalbot mrfoxtalbot moved this to To triage in Dotcom Core Fix Needed Sep 2, 2024
@renatho renatho self-assigned this Sep 24, 2024
@renatho renatho added the Groundskeeping Issues handled through Dotcom Groundskeeping rotations label Sep 24, 2024
@renatho
Copy link
Contributor

renatho commented Sep 25, 2024

Should be fixed with this PR: WordPress/gutenberg#65626

@supernovia
Copy link
Contributor

Noting these two issues might be duplicates or very similar:
#79317
#93675

@renatho thank you! 🙏

@nazilya06
Copy link

Another report: 8849232-zd-a8c

Advised to replace the Cover block behind the Nav menu with a Group block. Then add a Background image to the Group block.

@davemart-in davemart-in removed the Groundskeeping Issues handled through Dotcom Groundskeeping rotations label Oct 14, 2024
@davemart-in
Copy link
Contributor

Removing groundskeeper label since this has been picked up.

@renatho
Copy link
Contributor

renatho commented Oct 17, 2024

Closed with WordPress/gutenberg#66093

@nazilya06
Copy link

nazilya06 commented Jan 16, 2025

User reported same issue here: 9291659-zd-a8c. Reopened the bug report. I was able to replicate the same behavior on my test site.

Same as described by @Gustavo-Hilario here.

@github-actions github-actions bot added the [Interaction #] > 10 (Automated) interaction count label for better visibility. Please don't add these manualliy. label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Core Blocks Blocks that come with Gutenberg. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Interaction #] > 10 (Automated) interaction count label for better visibility. Please don't add these manualliy. Navigation [Platform] Atomic [Platform] Simple [Pri] Normal Schedule for the next available opportuinity. [Product] WordPress.com All features accessible on and related to WordPress.com. [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. Triaged To be used when issues have been triaged. [Type] Bug When a feature is broken and / or not performing as intended
Development

No branches or pull requests