mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-12 10:14:02 +02:00
* fixed cursor when we triple click on text and type over it * fixed * fixed * Add changeset Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
This commit is contained in:
@@ -483,6 +483,13 @@ export const Editable = (props: EditableProps) => {
|
||||
case 'insertFromYank':
|
||||
case 'insertReplacementText':
|
||||
case 'insertText': {
|
||||
const { selection } = editor
|
||||
if (selection) {
|
||||
if (Range.isExpanded(selection)) {
|
||||
Editor.deleteFragment(editor)
|
||||
}
|
||||
}
|
||||
|
||||
if (type === 'insertFromComposition') {
|
||||
// COMPAT: in Safari, `compositionend` is dispatched after the
|
||||
// `beforeinput` for "insertFromComposition". But if we wait for it
|
||||
|
Reference in New Issue
Block a user