fix: Various compounding memory leaks in editor (#5950)
This commit is contained in:
@@ -29,10 +29,10 @@ const Image = (props: Props) => {
|
||||
const [loaded, setLoaded] = React.useState(false);
|
||||
const [naturalWidth, setNaturalWidth] = React.useState(node.attrs.width);
|
||||
const [naturalHeight, setNaturalHeight] = React.useState(node.attrs.height);
|
||||
const documentBounds = useComponentSize(props.view.dom);
|
||||
const containerBounds = useComponentSize(
|
||||
document.body.querySelector("#full-width-container")
|
||||
);
|
||||
const documentBounds = props.view.dom.getBoundingClientRect();
|
||||
const maxWidth = layoutClass
|
||||
? documentBounds.width / 3
|
||||
: documentBounds.width;
|
||||
|
||||
Reference in New Issue
Block a user