mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-09-01 19:22:35 +02:00
The selection is no longer moved in insertText so we don't need this special case
This commit is contained in:
@@ -293,21 +293,6 @@ export const Editable = (props: EditableProps) => {
|
|||||||
if (editor.marks) {
|
if (editor.marks) {
|
||||||
native = false
|
native = false
|
||||||
}
|
}
|
||||||
|
|
||||||
// and because of the selection moving in `insertText` (create-editor.ts).
|
|
||||||
const { anchor } = selection
|
|
||||||
const inline = Editor.above(editor, {
|
|
||||||
at: anchor,
|
|
||||||
match: n => Editor.isInline(editor, n),
|
|
||||||
mode: 'highest',
|
|
||||||
})
|
|
||||||
if (inline) {
|
|
||||||
const [, inlinePath] = inline
|
|
||||||
|
|
||||||
if (Editor.isEnd(editor, selection.anchor, inlinePath)) {
|
|
||||||
native = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!native) {
|
if (!native) {
|
||||||
|
Reference in New Issue
Block a user