Fix Compose toolbar not showing on iOS 15
This commit is contained in:
parent
cbfae8c2c7
commit
fc75b50d7f
@ -157,8 +157,17 @@ private struct ComposeViewBody: View {
|
||||
.overlay(alignment: .bottom, content: {
|
||||
// This needs to be in an overlay, ignoring the keyboard safe area
|
||||
// doesn't work with the safeAreaInset modifier.
|
||||
|
||||
// When we're using the input accessory toolbar, hide the overlay toolbar so that,
|
||||
// on iPad, we don't get two toolbars showing.
|
||||
let showOverlayToolbar = if #available(iOS 16.0, *) {
|
||||
focusedField == nil
|
||||
} else {
|
||||
true
|
||||
}
|
||||
|
||||
if config.showToolbar,
|
||||
focusedField == nil {
|
||||
showOverlayToolbar {
|
||||
toolbarView
|
||||
.frame(maxHeight: .infinity, alignment: .bottom)
|
||||
.modifier(IgnoreKeyboardSafeAreaIfUsingInputAccessory())
|
||||
|
Loading…
x
Reference in New Issue
Block a user