1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-22 15:02:51 +02:00
* Revert #5542

Revert due to issues introduced.

* Add changeset
This commit is contained in:
Dylan Schiemann
2023-11-10 09:25:29 -07:00
committed by GitHub
parent fc081816e0
commit 22495e143d
2 changed files with 5 additions and 16 deletions

View File

@@ -4,7 +4,6 @@ import throttle from 'lodash/throttle'
import React, {
useCallback,
useEffect,
useLayoutEffect,
useMemo,
useReducer,
useRef,
@@ -177,21 +176,6 @@ export const Editable = (props: EditableProps) => {
[]
)
useLayoutEffect(() => {
return () => {
if (state == null) {
return
}
// Avoid leaking DOM nodes when this component is unmounted.
if (state.latestElement != null) {
state.latestElement.remove()
}
if (state.latestElement != null) {
state.latestElement = null
}
}
}, [])
// The autoFocus TextareaHTMLAttribute doesn't do anything on a div, so it
// needs to be manually focused.
useEffect(() => {