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

Columns block: fix arrow up into it #55197

Merged
merged 2 commits into from Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -56,7 +56,11 @@
}

.block-editor-inserter {
visibility: hidden;
opacity: 0;

&:focus-within {
opacity: 1;
}
}

&.is-drag-over {
Expand Down
29 changes: 29 additions & 0 deletions test/e2e/specs/editor/blocks/columns.spec.js
Expand Up @@ -380,4 +380,33 @@ test.describe( 'Columns', () => {
] );
} );
} );

test( 'should arrow up into empty columns', async ( { editor, page } ) => {
await editor.insertBlock( {
name: 'core/columns',
innerBlocks: [ { name: 'core/column' }, { name: 'core/column' } ],
} );
await editor.insertBlock( {
name: 'core/paragraph',
} );

await page.keyboard.press( 'ArrowUp' );
await page.keyboard.press( 'ArrowUp' );
await page.keyboard.press( 'Delete' );

await expect.poll( editor.getBlocks ).toMatchObject( [
{
name: 'core/columns',
innerBlocks: [
{
name: 'core/column',
},
],
},
{
name: 'core/paragraph',
attributes: { content: '' },
},
] );
} );
} );