mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-04-21 13:51:59 +02:00
* Revert #4749 See note at https://github.com/ianstormtaylor/slate/pull/4749#issuecomment-1025742142 * Create olive-bags-talk.md Add changeset
This commit is contained in:
parent
03861afc62
commit
6d62abc103
6
.changeset/olive-bags-talk.md
Normal file
6
.changeset/olive-bags-talk.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"slate-react": patch
|
||||
"slate": patch
|
||||
---
|
||||
|
||||
* Revert #4749, DOM & Slate selection are mismatching
|
@ -214,11 +214,8 @@ export const Editable = (props: EditableProps) => {
|
||||
// Otherwise the DOM selection is out of sync, so update it.
|
||||
state.isUpdatingSelection = true
|
||||
|
||||
const newDomRange =
|
||||
selection &&
|
||||
hasDomSelectionInEditor &&
|
||||
ReactEditor.toDOMRange(editor, selection)
|
||||
|
||||
const newDomRange = selection && ReactEditor.toDOMRange(editor, selection)
|
||||
|
||||
if (newDomRange) {
|
||||
if (Range.isBackward(selection!)) {
|
||||
domSelection.setBaseAndExtent(
|
||||
|
Loading…
x
Reference in New Issue
Block a user