You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
The FloatingPanel does not recalculate its height when the keyboard appears. This leads to conflicting constraints and causes the application to become unresponsive until it crashes due to memory issues.
Expected behavior
The FloatingPanel should dynamically adjust its height when the keyboard appears and invalidateLayout() is called.
Actual behavior
When a text field becomes focused, the layout is invalidated, and the panel attempts to recalculate its height. However, it fails to detect the keyboard height, resulting in conflicting constraints that cause the panel to become stuck. If a hardcoded height is provided before invalidating the layout, it functions correctly without memory issues/freeze.
Steps to reproduce
Present the FloatingPanel with a swiftui view that has a text field inside.
Focus on the text field to trigger the keyboard.
Observe that the FloatingPanel does not adjust its height appropriately and eventually the app crashes.
How do you display panel(s)?
self.present()
How many panels do you display?
1
Environment
Library version: 2.8.3
Installation method: Swift Package Manager
iOS version(s): 17.5
Xcode version: 15
The text was updated successfully, but these errors were encountered:
Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x2890ccff0 'FloatingPanel-static-height' FloatingPanelSurfaceView:0x109f33cf0.height == 0 (active)>",
"<NSLayoutConstraint:0x281025860 'FloatingPanel-surface-content' FloatingPanelSurfaceView:0x109f33cf0.height >= 1 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x281025860 'FloatingPanel-surface-content' FloatingPanelSurfaceView:0x109f33cf0.height >= 1 (active)>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
I think this issue can be resolved using UIHostingController+ignoreKeyboard extension and setting ignoresKeyboard to true. This is because Maps-SwiftUI does not crash showing a keyboard by the search bar. And I'm happy to send me a reproducer(a sample code) for this issue :)
Description
The FloatingPanel does not recalculate its height when the keyboard appears. This leads to conflicting constraints and causes the application to become unresponsive until it crashes due to memory issues.
Expected behavior
The FloatingPanel should dynamically adjust its height when the keyboard appears and invalidateLayout() is called.
Actual behavior
When a text field becomes focused, the layout is invalidated, and the panel attempts to recalculate its height. However, it fails to detect the keyboard height, resulting in conflicting constraints that cause the panel to become stuck. If a hardcoded height is provided before invalidating the layout, it functions correctly without memory issues/freeze.
Steps to reproduce
Present the FloatingPanel with a swiftui view that has a text field inside.
Focus on the text field to trigger the keyboard.
Observe that the FloatingPanel does not adjust its height appropriately and eventually the app crashes.
How do you display panel(s)?
self.present()
How many panels do you display?
1
Environment
Library version: 2.8.3
Installation method: Swift Package Manager
iOS version(s): 17.5
Xcode version: 15
The text was updated successfully, but these errors were encountered: