Skip to content

Commit c1f0679

Browse files
Shipping Labels: Fix the UI glitch on the shipment detail bottom sheet (#15940)
I'll merge this so it reaches the current milestone before freeze.
2 parents e80294a + 5a89d19 commit c1f0679

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- [*] Shipping Labels: Show UPS TOS modal in full length for better accessibility. [https://github.com/woocommerce/woocommerce-ios/pull/15926]
1616
- [*] Shipping Labels: Optimize data loading on purchase form [https://github.com/woocommerce/woocommerce-ios/pull/15919]
1717
- [*] Shipping Labels: Cache settings and origin addresses to improve loading experience for purchase form [https://github.com/woocommerce/woocommerce-ios/pull/15935]
18+
- [*] Shipping Labels: Fixed UI glitch on the bottom sheet of the purchase form. [https://github.com/woocommerce/woocommerce-ios/pull/15940]
1819
- [internal] Optimized assets for app size reduction [https://github.com/woocommerce/woocommerce-ios/pull/15881]
1920
- [*] Shipping Labels: Allow dots in HS tariff number input field for customs settings [https://github.com/woocommerce/woocommerce-ios/pull/15933]
2021

WooCommerce/Classes/ViewRelated/ReusableViews/SwiftUI Components/ExpandableBottomSheet.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,12 @@ struct ExpandableBottomSheet<AlwaysVisibleContent, ExpandableContent>: View wher
158158
}
159159
)
160160
.background(Color(.listForeground(modal: false)))
161+
.onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in
162+
/// When user swipes to move the app to the background, the drag gesture is started but never finishes.
163+
/// This workaround cancels the dragging when the app re-enters the foreground
164+
/// and fixes the glitch caused by the divider at the bottom of the scroll view.
165+
revealContentDuringDrag = false
166+
}
161167
}
162168

163169
private func calculateHeight(offsetBy dragAmount: CGFloat = 0) -> CGFloat {

0 commit comments

Comments
 (0)