@@ -24,11 +24,12 @@ struct NavigationView: View {
24
24
var body : some View {
25
25
ZStack { ForEach ( temporaryViews, id: \. id, content: createItem) }
26
26
. ignoresSafeArea ( )
27
+ . frame ( maxWidth: . infinity, maxHeight: . infinity)
27
28
. gesture ( createDragGesture ( ) )
28
29
. onChange ( of: stack. views, perform: onViewsChanged)
29
30
. onChange ( of: isGestureActive, perform: onDragGestureEnded)
30
31
. onAnimationCompleted ( for: animatableData. opacity, perform: onAnimationCompleted)
31
- . animation ( . keyboard, value: keyboardManager . isActive )
32
+ . animation ( . keyboard( withDelay : isKeyboardVisible ) , value: isKeyboardVisible )
32
33
}
33
34
}
34
35
private extension NavigationView {
@@ -105,8 +106,8 @@ private extension NavigationView {
105
106
ignoredAreas. edges. isOne ( of: . init( edge) , . all)
106
107
else { return screenManager. getSafeAreaValue ( for: edge) }
107
108
108
- if ignoredAreas. regions. isOne ( of: . keyboard, . all) && keyboardManager . isActive { return 0 }
109
- if ignoredAreas. regions. isOne ( of: . container, . all) && !keyboardManager . isActive { return 0 }
109
+ if ignoredAreas. regions. isOne ( of: . keyboard, . all) && isKeyboardVisible { return 0 }
110
+ if ignoredAreas. regions. isOne ( of: . container, . all) && !isKeyboardVisible { return 0 }
110
111
return screenManager. getSafeAreaValue ( for: edge)
111
112
}
112
113
func getBackground( _ item: AnyNavigatableView ) -> Color { getConfig ( item) . backgroundColour ?? config. backgroundColour }
@@ -308,6 +309,7 @@ private extension NavigationView {
308
309
// MARK: - Helpers
309
310
private extension NavigationView {
310
311
var gestureProgress : CGFloat { gestureData. translation / ( stack. transitionAnimation == . verticalSlide ? screenManager. size. height : screenManager. size. width) }
312
+ var isKeyboardVisible : Bool { keyboardManager. height > 0 }
311
313
}
312
314
313
315
// MARK: - Configurables
0 commit comments