Skip to content

Commit bb1f8e1

Browse files
committed
Move geometry reader outside of the scroll view
1 parent 160740c commit bb1f8e1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

WooCommerce/Classes/ViewRelated/Orders/Order Creation/OrderForm.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,12 @@ struct OrderForm: View {
241241
viewModel.saveInFlightOrderNotes()
242242
viewModel.saveInflightCustomerDetails()
243243
}
244+
.background(
245+
GeometryReader { geometryProxy in
246+
Color.clear
247+
.preference(key: WidthPreferenceKey.self, value: geometryProxy.size.width)
248+
}
249+
)
244250
}
245251

246252
private func updateSelectionSyncApproach(for presentationStyle: AdaptiveModalContainerPresentationStyle?) {
@@ -383,12 +389,6 @@ struct OrderForm: View {
383389
.accessibilityIdentifier(Accessibility.orderFormScrollViewIdentifier)
384390
.background(Color(.listBackground).ignoresSafeArea())
385391
.ignoresSafeArea(.container, edges: [.horizontal])
386-
.background(
387-
GeometryReader { geometryProxy in
388-
Color.clear
389-
.preference(key: WidthPreferenceKey.self, value: geometryProxy.size.width)
390-
}
391-
)
392392
}
393393
.onPreferenceChange(WidthPreferenceKey.self) { newWidth in
394394
bannerWidth = newWidth

0 commit comments

Comments
 (0)