Skip to content
Open
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
7 changes: 6 additions & 1 deletion packages/@react-spectrum/s2/src/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,12 @@ const toastRegion = style({
bottom: {
placement: {
bottom: {
default: 16,
// On mobile, when the on-screen keyboard is open the dynamic viewport
// (dvh) shrinks while the layout viewport (vh) stays the same.
// calc(100vh - 100dvh + 16px) equals the keyboard height + 16px,
// keeping the toast above the keyboard on any browser that supports dvh.
// On desktop (no keyboard) 100vh === 100dvh so this reduces to 16px.
default: '[calc(100vh - 100dvh + 16px)]',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is appearing too high off the bottom for me on iOS 26

maybe we can use

Suggested change
default: '[calc(100vh - 100dvh + 16px)]',
default: '[calc(env(safe-area-inset-bottom) + 16px)]',

though that may not work on previous iOS versions, @yihuiliao could you try this?

isExpanded: 0
}
}
Expand Down
Loading