Fix responsive, component, and lazy always returning an overlay

This commit is contained in:
Héctor Ramón Jiménez 2024-10-04 17:05:32 +02:00
parent fca5d8038a
commit d057b16153
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
3 changed files with 78 additions and 59 deletions

View file

@ -320,7 +320,11 @@ where
}
.build();
Some(overlay::Element::new(Box::new(overlay)))
if overlay.with_overlay(|(overlay, _layout)| overlay.is_some()) {
Some(overlay::Element::new(Box::new(overlay)))
} else {
None
}
}
}