File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
blocks/edit/prose/plugins Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ const isColumnSelected = (rect) => rect.top === 0 && rect.bottom === rect.map.he
49
49
const isTableSelected = ( rect ) => isRowSelected ( rect ) && isColumnSelected ( rect ) ;
50
50
51
51
export function handleTableBackspace ( state , dispatch ) {
52
- if ( ! isInTable ( state ) ) return false ;
52
+ if ( ! isInTable ( state ) || ! state . selection . $anchorCell ) return false ;
53
53
54
54
const rect = selectedRect ( state ) ;
55
55
if ( ! rect || rect . top === null ) return false ;
@@ -61,12 +61,10 @@ export function handleTableBackspace(state, dispatch) {
61
61
deleteTable ( state , dispatch ) ;
62
62
return true ;
63
63
}
64
-
65
64
if ( isRowSelected ( rect ) ) {
66
65
deleteRow ( state , dispatch ) ;
67
66
return true ;
68
67
}
69
-
70
68
if ( isColumnSelected ( rect ) ) {
71
69
deleteColumn ( state , dispatch ) ;
72
70
return true ;
You can’t perform that action at this time.
0 commit comments