fix(public-booking): enhance focus behavior for customer name input on slot selection

This commit is contained in:
Jose Selesan
2026-06-08 16:47:13 -03:00
parent ef2ded9d64
commit 72f273354e

View File

@@ -1174,7 +1174,11 @@ function SelectedSlotCard(props: BookingShellProps & { compact?: boolean }) {
useEffect(() => { useEffect(() => {
if (!selectedSlot) return; if (!selectedSlot) return;
customerNameInputRef.current?.focus(); const input = customerNameInputRef.current;
if (!input) return;
input.focus();
input.scrollIntoView({ behavior: 'smooth', block: 'center' });
}, [selectedSlot]); }, [selectedSlot]);
return ( return (