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: overlapping(z-index) issue when nested inside Cover Block #79317

Closed
Robertght opened this issue Jul 10, 2023 · 18 comments
Closed
Assignees
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Pri] Normal Schedule for the next available opportuinity. [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

Comments

@Robertght
Copy link

Robertght commented Jul 10, 2023

Quick summary

While having an overlay menu opened, the slideshow block shows up on top of the overlay.

Steps to reproduce

  1. Activate a block theme(tested with Blank Canvas, 2023, Quadrat)
  2. Open the default page template
  3. Set a Cover block in the header with a smaller height. (20-40vh)
  4. Set the navigation block's overlay menu to "alaway".
  5. After the header template part, add a slideshow block(or multiple, I don't judge)
  6. Publish the changes and open the menu

What you expected to happen

To see the navigation menu correctly

What actually happened

This happened: Xq6sxq.png (yes that image is from the slideshow)

Browser

Google Chrome/Chromium, Mozilla Firefox, Microsoft Edge

Context

No response

Platform (Simple, Atomic, or both?)

Simple

Other notes

Found that in Slack while trying to help with CSS: p1687930863677319-slack-C03TY6J1A

I only tested this on Simple websites and on a Pressable website.
The issue only manifested on the Simple sites, using the same themes.

Reproducibility

Consistent

Severity

Some (< 50%)

Available workarounds?

Yes, difficult to implement

Workaround details

CSS is the only thing I could suggest.

The most straightforward method is to add a class to the cover block, then add this CSS. If "fixclipping" is the class, add:

.fixclipping {
	overflow: visible;
}

Or you can select in other ways. In Slack we used:

/* adjust the z-index on the slideshow | xxxxxx-zen */
.wp-block-cover-image .wp-block-cover__inner-container, .wp-block-cover .wp-block-cover__inner-container {
	z-index: 99999;
}

(edited to add the class method since the other wasn't working consistently for me)

@Robertght Robertght added [Type] Bug User Report Needs triage Ticket needs to be triaged [Feature Group] Appearance & Themes Features related to the appearance of sites. labels Jul 10, 2023
@github-actions github-actions bot added the [Pri] TBD Review and assign an appropriate [Pri] label as soon as possible. label Jul 10, 2023
@github-actions
Copy link

github-actions bot commented Jul 10, 2023

Support References

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

  • -zen
  • 7228873-zen
  • 7277570-zen
  • 7825401-zen
  • 8082235-zen
  • 8173661-zen
  • 8380863-zen
  • 8702470-zen
  • 8715843-zen
  • 8772803-zen

@cuemarie cuemarie added [Pri] Normal Schedule for the next available opportuinity. and removed [Pri] TBD Review and assign an appropriate [Pri] label as soon as possible. labels Jul 12, 2023
@cuemarie cuemarie transferred this issue from Automattic/themes Jul 12, 2023
@cuemarie cuemarie removed the [Feature Group] Appearance & Themes Features related to the appearance of sites. label Jul 12, 2023
@cuemarie
Copy link

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

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

📌 FINDINGS/SCREENSHOTS/VIDEO

  • The problem only appears when the Nav Block is placed inside a Cover block (the height of the cover block has no impact on the behavior). The z-index of the Slideshow and the Nav block are as follows in both setups:

wp-block-jetpack-slideshow_container

.swiper-container {
     z-index: 1;
}

wp-block-navigation__responsive-container hidden-by-default has-modal-open is-menu-open

.wp-block-navigation__responsive-container.is-menu-open {
     z-index: 100000;
}

The Cover block is the key difference, and the cover block also has a z-index: 1, and that z-index is likely what's causing problems. There are a few open issues about this in /gutenberg such as:

Screenshots/Recordings

Simple Site, with Nav Block inside Cover Block:
Markup on 2023-07-12 at 12:48:25

Same site without Cover Block:
Markup on 2023-07-12 at 12:48:41

📌 ACTIONS

  • Assigned to Other
  • Added to ‘HE Cross-repo Watchlist’ project board

@cuemarie cuemarie added [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. and removed Needs triage Ticket needs to be triaged labels Jul 12, 2023
@cuemarie cuemarie changed the title Navigation block/Cover block & Slideshow block: overlapping(z-index) issue Navigation block: overlapping(z-index) issue when nested inside Cover Block Aug 3, 2023
@janmckell
Copy link

This occurred here:
7228873-zd-a8c

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Oct 28, 2023
@carolframen
Copy link

7277570-zen

This issue is not exactly the same as what is happening in this ticket, as the ticket is not about the overlay menu, and the height of the menu does affect the issue. This ticket is the same issue as the merged one #80151.

This user is on the personal plan, so they can't add CSS, but I replicated the issue on my site and tried the CSS workaround for this situation and it did not work.

I tested and making the cover block longer in this case does help, but it might not be how the user wants it to look like

@Aurorum
Copy link
Contributor

Aurorum commented Mar 3, 2024

7825401-zen - CSS workaround also doesn't help

@mahfuzurwp
Copy link

7825401 -zen
Setting the overflow to visible of the cover block worked in this ticket.

.wp-block-cover{
overflow: visible;
}

@rinazrina
Copy link

Related issue: #75439

@vinnykaur
Copy link

One more: 8082235-zd-a8c

@upwardmomentum84
Copy link

Related issue: 8173661-zd-a8c

The submenu on mobile was being overlayed by the Cover block below it. I added a CSS class to set the Cover block that contained the menu to have a high z-index and this resolved it.

@hngdny
Copy link

hngdny commented Jul 1, 2024

Related issue: 8380863-zd-a8c

Used the workaround to set custom CSS class + high Z-index

@supernovia
Copy link
Contributor

We have a case here:
8702470-zd-a8c -- user isn't actually doing anything with the cover block anymore, so I'd recommended not using it and reverting back to a version that works, but we can add the CSS if user responds affirming they want it

@mrfoxtalbot
Copy link

As a workaround, we can recommend users they replace their cover block with a group block, now that group blocks support background images. I tested it and the dropdown menu shows outside the group block without any issues:

Kapture.2024-09-13.at.15.08.41.mp4

@supernovia
Copy link
Contributor

I've got another case here.
8715843-zd-a8c

@supernovia
Copy link
Contributor

As a workaround, we can recommend users they replace their cover block with a group block, now that group blocks support background images. I tested it and the dropdown menu shows outside the group block without any issues:

I've just tested this on a simple site + personal plan; alas I couldn't get it to work.

@supernovia
Copy link
Contributor

Another case here: 8772803-zd-a8c

@supernovia
Copy link
Contributor

This might be a duplicate or likeness of this issue:
#75439

@renatho
Copy link
Contributor

renatho commented Oct 8, 2024

This might be a duplicate or likeness of this issue: #75439

Yes! I just checked that the issue with the Slideshow is also fixed with the same PR.

@renatho
Copy link
Contributor

renatho commented Oct 8, 2024

As suggested by @supernovia it's duplicate (#75439), so I'm closing it.

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". [Pri] Normal Schedule for the next available opportuinity. [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
Projects
None yet
Development

No branches or pull requests