mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 10:29:48 +02:00
Use key instead of node arguments in some places
This commit is contained in:
@@ -493,13 +493,13 @@ function Plugin(options = {}) {
|
||||
if (state.isExpanded) return
|
||||
|
||||
const { document, startText } = state
|
||||
const hasVoidParent = document.hasVoidParent(startText)
|
||||
const hasVoidParent = document.hasVoidParent(startText.key)
|
||||
|
||||
if (
|
||||
startText.text == '' ||
|
||||
hasVoidParent
|
||||
) {
|
||||
const previousText = document.getPreviousText(startText)
|
||||
const previousText = document.getPreviousText(startText.key)
|
||||
if (!previousText) return
|
||||
|
||||
debug('onKeyDownLeft', { data })
|
||||
|
Reference in New Issue
Block a user