Skip to content

Commit

Permalink
Fix customizer block toolbar after popover refactor (#41312)
Browse files Browse the repository at this point in the history
* Fix customizer block toolbar after popover refactor

* Fix more popovers

* Fix e2e test

Co-authored-by: George Mamadashvili <georgemamadashvili@gmail.com>
  • Loading branch information
youknowriad and Mamaduka committed May 26, 2022
1 parent 06e9f6d commit 41feda5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
}

.customize-control-sidebar_block_editor .block-editor-block-list__block-popover {
position: fixed;
// FloatingUI library used in Popover component forces us to have an "absolute" inline style.
// We need to override this in the customizer.
position: fixed !important;
z-index: z-index(".customize-widgets__block-toolbar");
}

.customize-widgets-popover .components-popover {
// FloatingUI library used in Popover component forces us to have an "absolute" inline style.
// We need to override this in the customizer.
position: fixed !important;
}
5 changes: 5 additions & 0 deletions test/e2e/specs/widgets/customizing-widgets.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ test.describe( 'Widgets Customizer', () => {
)
).toBeVisible();

// Clear block selection, so the block toolbar isn't visible.
await page.evaluate( () => {
window.wp.data.dispatch( 'core/block-editor' ).clearSelectedBlock();
} );

await widgetsCustomizerPage.addBlock( 'Heading' );
await page.keyboard.type( 'My Heading' );

Expand Down

0 comments on commit 41feda5

Please sign in to comment.