Skip to content

Commit

Permalink
Site editor: bump the z-index of the rename modal (#54277)
Browse files Browse the repository at this point in the history
* This commit bumps the rename modal z-index to be one higher than the dropdown popover component, which is set to 1000000 in the component stylesheet

* Update style.scss

The +1 is unnecessary thanks to document tree order.

* Add z-index entry

* Moving styles to existing stylesheet
  • Loading branch information
ramonjd authored Sep 8, 2023
1 parent f870f11 commit b606951
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/base-styles/_z-index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ $z-layers: (
".block-editor-block-lock-modal": 1000001,
".block-editor-template-part__selection-modal": 1000001,
".block-editor-block-rename-modal": 1000001,
".edit-site-list__rename-modal": 1000001,

// Note: The ConfirmDialog component's z-index is being set to 1000001 in packages/components/src/confirm-dialog/styles.ts
// because it uses emotion and not sass. We need it to render on top its parent popover.
Expand Down
2 changes: 2 additions & 0 deletions packages/edit-site/src/components/list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@
}

.edit-site-list__rename-modal {
// The rename dropdown popover is open at the same time as the rename modal. The latter has to be higher.
z-index: z-index(".edit-site-list__rename-modal");
.components-base-control {
@include break-medium() {
width: $grid-unit * 40;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default function RenameMenuItem( { item, onClose } ) {
setIsModalOpen( false );
onClose();
} }
overlayClassName="edit-site-list__rename_modal"
overlayClassName="edit-site-list__rename-modal"
>
<form onSubmit={ onRename }>
<VStack spacing="5">
Expand Down

0 comments on commit b606951

Please sign in to comment.