Fix: Deleted image zooms out to (0, 0) upon closing Lightbox (#10154)

* fix: when the lightbox active image is deleted in editor, it zooms out to (0, 0) upon closing lightbox

* Update Lightbox.tsx

---------

Co-authored-by: Tom Moor <tom@getoutline.com>
This commit is contained in:
Apoorv Mishra
2025-09-13 17:19:03 +05:30
committed by GitHub
parent 24c01b1a9a
commit fc469ef9c2
+1 -1
View File
@@ -291,7 +291,7 @@ function Lightbox({ onUpdate, activePos }: Props) {
// in editor
const editorImageEl = imageElements[currentImageIndex];
let to;
if (editorImageEl) {
if (editorImageEl?.isConnected) {
const editorImgDOMRect = editorImageEl.getBoundingClientRect();
const {
top: editorImgTop,