.ignoresSafeArea(.all) doesn't ignore changes due to keyboard showing on Android
Open
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 330
- Forks
- 76
- Avg merge
- 3h 6m
- Merged PRs (30d)
- 1
Description
.ignoresSafeArea(.all) doesn't ignore changes due to keyboard showing on Android. When the keyboard is shown the text field moves but it shouldn't (and doesn't in iOS).
Example code:
import SwiftUI
struct ContentView: View {
@State private var text = ""
var body: some View {
VStack {
Rectangle()
.fill(.green)
.frame(maxHeight: .infinity)
TextField("", text: $text)
Rectangle()
.fill(.blue)
.frame(maxHeight: .infinity)
}
.ignoresSafeArea(.all)
}
}
https://github.com/user-attachments/assets/3c798dc7-ade6-41c3-b188-e65e08f98967
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided ContentView example on Android and compare its layout when the keyboard appears with the expected iOS behavior. Trace the Android handling of safe-area and keyboard insets; done means .ignoresSafeArea(.all) prevents the TextField and surrounding layout from moving when the keyboard is shown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100