Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/panel/src/toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,11 @@ function useStackGlide(): React.RefObject<HTMLOListElement | null> {
useLayoutEffect(() => {
const root = list.current;
if (root === null) return;
// Note that an empty stack, as it stands nearly always, reads nothing: reading the tokens or a box lays out the whole window, and the stack is drawn again with everything around it.
if (root.children.length === 0) {
if (drawn.current.size > 0) drawn.current = new Map();
return;
}
const style = getComputedStyle(root);
const duration = Number.parseFloat(style.getPropertyValue("--duration-fast")) || 0;
const easing = style.getPropertyValue("--spring-fast").trim();
Expand Down
Loading