mirror of
https://github.com/outline/outline.git
synced 2026-05-12 13:21:17 -05:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user