Skip to content

Commit

Permalink
Fix selection of small table cells (#9673)
Browse files Browse the repository at this point in the history
Move table block editor cell padding to the RichText element within the cell.
  • Loading branch information
talldan authored Sep 10, 2018
1 parent 960bb6e commit f5338ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/block-library/src/table/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ export default class TableEdit extends Component {
return (
<CellTag key={ columnIndex } className={ classes }>
<RichText
className="wp-block-table__cell-content"
value={ content }
onChange={ this.onChange }
unstableOnFocus={ this.createOnFocus( cell ) }
Expand Down
6 changes: 5 additions & 1 deletion packages/block-library/src/table/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

td,
th {
padding: 0.5em;
padding: 0;
border: $border-width solid currentColor;
}

Expand All @@ -16,4 +16,8 @@
box-shadow: inset 0 0 0 1px $blue-medium-500;
border-style: double;
}

&__cell-content {
padding: 0.5em;
}
}

0 comments on commit f5338ed

Please sign in to comment.