mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-09-01 03:11:44 +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
|
if (state.isExpanded) return
|
||||||
|
|
||||||
const { document, startText } = state
|
const { document, startText } = state
|
||||||
const hasVoidParent = document.hasVoidParent(startText)
|
const hasVoidParent = document.hasVoidParent(startText.key)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
startText.text == '' ||
|
startText.text == '' ||
|
||||||
hasVoidParent
|
hasVoidParent
|
||||||
) {
|
) {
|
||||||
const previousText = document.getPreviousText(startText)
|
const previousText = document.getPreviousText(startText.key)
|
||||||
if (!previousText) return
|
if (!previousText) return
|
||||||
|
|
||||||
debug('onKeyDownLeft', { data })
|
debug('onKeyDownLeft', { data })
|
||||||
|
Reference in New Issue
Block a user