Skip to content

Commit

Permalink
The selection is no longer moved in insertText so we don't need this …
Browse files Browse the repository at this point in the history
…special case
  • Loading branch information
jameshfisher committed Oct 10, 2021
1 parent 6619014 commit f9f36cd
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions packages/slate-react/src/components/editable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f9f36cd

Please sign in to comment.