File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
WooCommerce/Classes/ViewRelated/Orders/Order Details/Address Edit Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,17 @@ struct EditAddressForm: View {
147147 LazyNavigationLink ( destination: FilterListSelector ( viewModel: StateSelectorViewModel ( ) ) , isActive: $showStateSelector) {
148148 EmptyView ( )
149149 }
150+
151+ ///
152+ /// iOS 14.5 has a bug where
153+ /// Pushing a view while having "exactly two" navigation links makes the pushed view to be popped when the initial view changes its state.
154+ /// EG: AddressForm -> CountrySelector -> Country is selected -> AddressForm updates country -> CountrySelector is popped automatically.
155+ /// Adding an extra and useless navigation link fixes the problem but throws a warning in the console.
156+ /// Ref: https://forums.swift.org/t/14-5-beta3-navigationlink-unexpected-pop/45279
157+ ///
158+ NavigationLink ( destination: EmptyView ( ) ) {
159+ EmptyView ( )
160+ }
150161 }
151162
152163 /// Decides if the navigation trailing item should be a done button or a loading indicator.
You can’t perform that action at this time.
0 commit comments