Skip to content

Commit

Permalink
Merge branch 'main' into move
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischrischris authored Dec 17, 2024
2 parents 17b557a + 5c10110 commit e2237a7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions blocks/edit/prose/plugins/keyHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const isColumnSelected = (rect) => rect.top === 0 && rect.bottom === rect.map.he
const isTableSelected = (rect) => isRowSelected(rect) && isColumnSelected(rect);

export function handleTableBackspace(state, dispatch) {
if (!isInTable(state)) return false;
if (!isInTable(state) || !state.selection.$anchorCell) return false;

const rect = selectedRect(state);
if (!rect || rect.top === null) return false;
Expand All @@ -61,12 +61,10 @@ export function handleTableBackspace(state, dispatch) {
deleteTable(state, dispatch);
return true;
}

if (isRowSelected(rect)) {
deleteRow(state, dispatch);
return true;
}

if (isColumnSelected(rect)) {
deleteColumn(state, dispatch);
return true;
Expand Down

0 comments on commit e2237a7

Please sign in to comment.