mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-04-21 13:51:59 +02:00
This reverts commit 7499d4b4c01a089906a96f30f6c04256204ca65e. The issue reported at https://github.com/ianstormtaylor/slate/issues/4862 is a valid complaint, but change in https://github.com/ianstormtaylor/slate/pull/4868 is not an appropriate fix. It is a serious breaking change, reported as bug: https://github.com/ianstormtaylor/slate/issues/5153 We should therefore revert the change. If we wish to fix Chromium's triple-click bug, we should do so by unhanging the selection when it is created; not by changing insertText behavior.
This commit is contained in:
parent
d39943741f
commit
1b14de5f8e
@ -648,13 +648,6 @@ 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user