Skip to content

Commit

Permalink
Click on the table again to close TablePropertiesForm
Browse files Browse the repository at this point in the history
  • Loading branch information
attoae authored Sep 19, 2024
2 parents d73c284 + 8963691 commit 1a75638
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/ui/cell-selection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class CellSelection {
this.clearSelected();
const table = (e.target as Element).closest('table');
if (!table) return;
this.tableBetter.tableMenus.destroyTablePropertiesForm();
const startTd = (e.target as Element).closest('td');
this.startTd = startTd;
this.endTd = startTd;
Expand Down
4 changes: 1 addition & 3 deletions src/ui/table-menus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import merge from 'lodash.merge';
import {
createTooltip,
getAlign,
getCellChildBlot,
getCellFormats,
getCorrectBounds,
getComputeBounds,
Expand Down Expand Up @@ -743,8 +742,7 @@ class TableMenus {
tableBlot.insertColumnCell(row, id, ref);
}
const [formats] = getCellFormats(blot);
const childBlot = getCellChildBlot(blot);
childBlot.format(blot.statics.blotName, {
blot.replaceWith(blot.statics.blotName, {
...formats,
width: ~~(width / colspan),
colspan: null,
Expand Down

0 comments on commit 1a75638

Please sign in to comment.