mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 18:39:51 +02:00
Enable insert in the start of table cell (#1880)
* Enable insert in the beginning of table * Faster Return
This commit is contained in:
committed by
Ian Storm Taylor
parent
9fc8b1085a
commit
178fc78f1a
@@ -89,8 +89,12 @@ class Tables extends React.Component {
|
||||
const prevBlock = document.getClosestBlock(previous.key)
|
||||
|
||||
if (prevBlock.type == 'table-cell') {
|
||||
if (['Backspace', 'Delete', 'Enter'].includes(event.key)) {
|
||||
event.preventDefault()
|
||||
return true
|
||||
} else {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user