fix: Flash of content when selecting text on RHS of document (#2981)

fix: Double portal
This commit is contained in:
Tom Moor
2022-01-22 18:10:23 -08:00
committed by GitHub
parent 80c6e57aa3
commit e8c88b3c33
5 changed files with 79 additions and 81 deletions

View File

@@ -4,8 +4,8 @@ export default function useComponentSize(
ref: React.RefObject<HTMLElement>
): { width: number; height: number } {
const [size, setSize] = useState({
width: 0,
height: 0,
width: ref.current?.clientWidth || 0,
height: ref.current?.clientHeight || 0,
});
useEffect(() => {