Primitives · a raise keeps its state under its owner's id
A raise inside another was namespaced by its place in the layer's queue, so one that came before it moved its id path and rebuilt its keyed state and focus: an open date popup would lose its month when a tip appeared. raise now takes its owner's id and draws under it, and float and float_height pass the owner's id on from every call site. A test holds a focused box in a raise while another comes before it.
This commit is contained in:
1 parent
341420d1e4
commit
51ade29032
25 files changed
+188
-40
No files matched your search
@@ -225,7 +225,7 @@ impl RenderOnce for ToastViewport {
|
||||
cards.push(card(&self.id, ix, &self.toaster, window, cx));
|
||||
}
|
||||
let stack = div()
|
||||
.id(self.id)
|
||||
.id(self.id.clone())
|
||||
.occlude()
|
||||
.flex()
|
||||
.flex_col()
|
||||
@@ -235,6 +235,7 @@ impl RenderOnce for ToastViewport {
|
||||
})
|
||||
.children(cards);
|
||||
raise(
|
||||
(self.id, "raised"),
|
||||
anchored()
|
||||
.position(point(viewport.width - margin, viewport.height - margin))
|
||||
.anchor(Corner::BottomRight)
|
||||
|
||||
Reference in new issue
Block a user