mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-14 11:14:04 +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:
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,10 +214,7 @@ export const Editable = (props: EditableProps) => {
|
|||||||
// Otherwise the DOM selection is out of sync, so update it.
|
// Otherwise the DOM selection is out of sync, so update it.
|
||||||
state.isUpdatingSelection = true
|
state.isUpdatingSelection = true
|
||||||
|
|
||||||
const newDomRange =
|
const newDomRange = selection && ReactEditor.toDOMRange(editor, selection)
|
||||||
selection &&
|
|
||||||
hasDomSelectionInEditor &&
|
|
||||||
ReactEditor.toDOMRange(editor, selection)
|
|
||||||
|
|
||||||
if (newDomRange) {
|
if (newDomRange) {
|
||||||
if (Range.isBackward(selection!)) {
|
if (Range.isBackward(selection!)) {
|
||||||
|
Reference in New Issue
Block a user