diff --git a/apps/user-ui/src/components/AddressForm.tsx b/apps/user-ui/src/components/AddressForm.tsx index 95ed547..19651d6 100644 --- a/apps/user-ui/src/components/AddressForm.tsx +++ b/apps/user-ui/src/components/AddressForm.tsx @@ -1,8 +1,8 @@ import React, { useCallback, useEffect, useState } from 'react'; -import { View, Modal, ScrollView, KeyboardAvoidingView, Platform, Keyboard } from 'react-native'; +import { View, Modal, ScrollView, KeyboardAvoidingView, Platform, Keyboard, StyleSheet, ActivityIndicator } from 'react-native'; import { Formik } from 'formik'; import * as Yup from 'yup'; -import { tw, MyText, MyTouchableOpacity , Checkbox , MyTextInput , LoadingDialog , BottomDialog , BottomDropdown } from 'common-ui'; +import { tw, MyText, MyTouchableOpacity , Checkbox , MyTextInput , BottomDialog , BottomDropdown } from 'common-ui'; import MaterialIcons from '@expo/vector-icons/MaterialIcons'; import { trpc } from '../trpc-client'; import LocationMapStep from './location/LocationMapStep'; @@ -469,10 +469,27 @@ const AddressForm: React.FC - + {/* + The submit loader is an in-tree overlay, NOT a LoadingDialog Modal. + This form is itself rendered inside a Modal (cart/me sheets, the location + flow). Dismissing a nested Modal and then the hosting Modal in quick + succession leaves an invisible native layer that blocks every touch on + iOS (react-native#50152). Keeping the loader inline removes the second + Modal entirely, so closing the sheet can never strand that layer. + */} + {isSubmitting && ( + + + + + {isEdit ? "Updating address..." : "Adding address..."} + + + + )} {/* Region picker: the map opens focused on whichever region is chosen. */} diff --git a/change-log.txt b/change-log.txt index 217d760..47dcfe8 100644 --- a/change-log.txt +++ b/change-log.txt @@ -867,3 +867,17 @@ never read the new switch. WebViewWrapper was a third surface (host-gated + ROOT-34: closable store dialog renders Later and dismisses. --- apps/user-ui/JEST-TEST-CASES.md + ROOT-33/ROOT-34 rows; ROOT-05/06 note the switch. + +[2026-11-08 15:47:34 IST] cart add-address: fix the invisible touch-blocking layer after a successful save (ported from neo-region). + +On iOS, a Modal dismissed while another Modal is presenting/dismissing can leave +an empty native layer that swallows every touch (react-native#50152). The cart's +add-address form is already inside RawBottomDialog/CartAddressGate's Modal, and +AddressForm rendered its submit loader as a second Modal (LoadingDialog), then +closed that loader and the host sheet in quick succession. After saving, the +cart looked frozen. + +--- apps/user-ui/src/components/AddressForm.tsx +- submit (nested Modal) ++ inline absolute-fill overlay with the same spinner + message inside the form's + KeyboardAvoidingView; no second native modal to leave behind