From f9f36cd43937ed44272294c1c3c19ca2f3302f2d Mon Sep 17 00:00:00 2001 From: Jim Fisher Date: Sun, 10 Oct 2021 13:27:09 +0100 Subject: [PATCH] The selection is no longer moved in insertText so we don't need this special case --- packages/slate-react/src/components/editable.tsx | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/packages/slate-react/src/components/editable.tsx b/packages/slate-react/src/components/editable.tsx index 872bec892..8cf257c61 100644 --- a/packages/slate-react/src/components/editable.tsx +++ b/packages/slate-react/src/components/editable.tsx @@ -293,21 +293,6 @@ export const Editable = (props: EditableProps) => { if (editor.marks) { 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) {