Skip to content

Commit

Permalink
Add z-index to skelton content to avoid publish button bug
Browse files Browse the repository at this point in the history
Adding z-index to body causes Publish button in actions sidebar to appear underneath the layout header causing the “wrong” publish button to be shown. Applying z-index to content avoids this whilst achieving the same outcome in terms of avoiding the bleed of backgrounfd on mobile safari when scrolling the Widgets editor.
  • Loading branch information
getdave committed Jun 21, 2021
1 parent 3edd18b commit c4908da
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/interface/src/components/interface-skeleton/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ html.interface-interface-skeleton__html-container {
// See also: https://drafts.csswg.org/css-overscroll/
overscroll-behavior-y: none;

// On Safari iOS on smaller viewports lack of a z-index causes the background
// to "bleed" through the header.
// See https://github.com/WordPress/gutenberg/issues/32631
z-index: z-index(".interface-interface-skeleton__body");

// Footer overlap prevention
.has-footer & {
@include break-medium() {
Expand All @@ -87,9 +82,13 @@ html.interface-interface-skeleton__html-container {
// On Mobile the header is fixed to keep HTML as scrollable.
// Beyond the medium breakpoint, we allow the sidebar.
// The sidebar should scroll independently, so enable scroll here also.

overflow: auto;

// On Safari iOS on smaller viewports lack of a z-index causes the background
// to "bleed" through the header.
// See https://github.com/WordPress/gutenberg/issues/32631
z-index: z-index(".interface-interface-skeleton__body");

}

.interface-interface-skeleton__secondary-sidebar,
Expand Down

0 comments on commit c4908da

Please sign in to comment.