mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 16:05:19 +00:00
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:
@@ -537,7 +537,10 @@ struct ContentView: View {
|
||||
.background(backgroundColor.opacity(0.95))
|
||||
}
|
||||
.onAppear {
|
||||
isTextFieldFocused = true
|
||||
// Delay keyboard focus to avoid iOS constraint warnings
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
||||
isTextFieldFocused = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user