Skip to content

Commit

Permalink
Columns block: fix arrow up into it
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Mar 27, 2024
1 parent 689d529 commit b08890d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
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: '' },
},
] );
} );
} );

0 comments on commit b08890d

Please sign in to comment.