1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-31 19:01:54 +02:00
Revert due to issues introduced.
This commit is contained in:
Dylan Schiemann
2023-11-10 09:23:34 -07:00
committed by GitHub
parent fc081816e0
commit 34e1c2110f

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(() => {