Skip to content

Commit

Permalink
Post title: remove class from old div to fix alignment (#34489)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix authored and youknowriad committed Sep 3, 2021
1 parent b8b76f2 commit 4432fd2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ describe( 'deleting all blocks', () => {
await page.keyboard.type( 'Paragraph' );
await clickOnBlockSettingsMenuRemoveBlockButton();

// There is a default block:
// There is a default block and post title:
expect(
await page.$$( '.block-editor-block-list__block' )
).toHaveLength( 1 );
).toHaveLength( 2 );

// But the effective saved content is still empty:
expect( await getEditedPostContent() ).toBe( '' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe( 'block mover', () => {
await page.keyboard.type( 'Second Paragraph' );

// Select a block so the block mover is rendered.
await page.focus( '.block-editor-block-list__block' );
await page.focus( '[data-type="core/paragraph"]' );

await showBlockToolbar();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ describe( 'splitting and merging blocks', () => {
await insertBlock( 'Paragraph' );
await page.keyboard.press( 'Backspace' );

// There is a default block:
// There is a default block and post title:
expect(
await page.$$( '.block-editor-block-list__block' )
).toHaveLength( 1 );
).toHaveLength( 2 );

// But the effective saved content is still empty:
expect( await getEditedPostContent() ).toBe( '' );
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-post/src/components/text-editor/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
flex-grow: 1;

// Post title.
.editor-post-title.editor-post-title__block {
.editor-post-title {
max-width: none;
line-height: $default-line-height;

Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/components/post-title/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export default function PostTitle() {
// The wp-block className is important for editor styles.
// This same block is used in both the visual and the code editor.
const className = classnames(
'wp-block editor-post-title editor-post-title__block editor-post-title__input rich-text',
'wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text',
{
'is-selected': isSelected,
'is-focus-mode': isFocusMode,
Expand Down

0 comments on commit 4432fd2

Please sign in to comment.