Skip to content

Commit f5338ed

Browse files
authored
Fix selection of small table cells (#9673)
Move table block editor cell padding to the RichText element within the cell.
1 parent 960bb6e commit f5338ed

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

packages/block-library/src/table/edit.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ export default class TableEdit extends Component {
332332
return (
333333
<CellTag key={ columnIndex } className={ classes }>
334334
<RichText
335+
className="wp-block-table__cell-content"
335336
value={ content }
336337
onChange={ this.onChange }
337338
unstableOnFocus={ this.createOnFocus( cell ) }

packages/block-library/src/table/editor.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
td,
88
th {
9-
padding: 0.5em;
9+
padding: 0;
1010
border: $border-width solid currentColor;
1111
}
1212

@@ -16,4 +16,8 @@
1616
box-shadow: inset 0 0 0 1px $blue-medium-500;
1717
border-style: double;
1818
}
19+
20+
&__cell-content {
21+
padding: 0.5em;
22+
}
1923
}

0 commit comments

Comments
 (0)