Fix iOS keyboard constraint warnings

- Added 0.1s delay before focusing text field on appear
- This gives iOS time to properly layout keyboard views
- Prevents constraint conflict warnings in system keyboard
This commit is contained in:
jack
2025-07-24 15:15:28 +02:00
parent bdbc0a6cfe
commit 498bb30d82
+3
View File
@@ -537,9 +537,12 @@ struct ContentView: View {
.background(backgroundColor.opacity(0.95)) .background(backgroundColor.opacity(0.95))
} }
.onAppear { .onAppear {
// Delay keyboard focus to avoid iOS constraint warnings
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
isTextFieldFocused = true isTextFieldFocused = true
} }
} }
}
private func sendMessage() { private func sendMessage() {
viewModel.sendMessage(messageText) viewModel.sendMessage(messageText)