Skip to content

Toast Alignment Problem When Keyboard is Open #42

@vadimue

Description

@vadimue

First, thank you for the library! However, I’ve encountered an issue with the alignment of the toast notification when the keyboard is open. The toast gets partially hidden behind the keyboard, even though it is aligned at .bottom.

Code Snippet:

.simpleToast(isPresented: $showCopyToast, options: SimpleToastOptions(alignment: .bottom, hideAfter: 2)) {
    Label("Copied", systemImage: "square.on.square")
        .padding()
        .background(Color.containerContainer)
        .foregroundColor(Color.white)
        .cornerRadius(12)
        .padding(.top)
}

Steps to Reproduce:

  1. Use the provided code to display a toast aligned at .bottom.
  2. Open the keyboard in the app while the toast is being presented.

Expected Behavior:

The toast should remain visible and adjust its position to stay above the keyboard.

Actual Behavior:

The toast is partially hidden behind the keyboard when it appears.

Environment:

  • iOS Version: 18.1
  • Library Version: 0.10.1
Screenshot 2024-12-06 at 17 16 39

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingstale

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions