Skip to content

Commit c5dbfb2

Browse files
committed
component overlay position fix
1 parent a3744ec commit c5dbfb2

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lazy/src/component.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,14 +263,15 @@ where
263263
.build(),
264264
);
265265

266-
cache.as_ref().unwrap().borrow_overlay().is_some()
266+
cache
267+
.as_ref()
268+
.unwrap()
269+
.borrow_overlay()
270+
.map(|overlay| overlay.position())
267271
});
268272

269-
has_overlay.then(|| {
270-
overlay::Element::new(
271-
layout.position(),
272-
Box::new(Overlay { instance: self }),
273-
)
273+
has_overlay.map(|pos| {
274+
overlay::Element::new(pos, Box::new(Overlay { instance: self }))
274275
})
275276
}
276277
}

0 commit comments

Comments
 (0)