You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(contact): add browser detection and mobile-specific handling
- Implement comprehensive browser detection (Chrome, Firefox, Safari, Edge)
- Add mobile device detection (iOS, Android, general mobile)
- Optimize email opening methods per browser and device type
- Mobile: Use location.href (most reliable on mobile devices)
- Chrome: Multiple fallback methods for strict security policies
- Firefox/Safari/Edge: Direct window.open (works well)
- Customize success messages and UI for mobile vs desktop
- Mobile-friendly fallback modal with full-width buttons
- Shorter timeout delays on mobile devices
- Platform-specific messaging and instructions
✅ Perfect! Your email client should now open with a professionally formatted message ready to send. The email includes your contact information and message in a clean, business-friendly format.
281
+
{browserInfo.isMobile ? (
282
+
<>
283
+
✅ Perfect! Your mobile email app should now open with a professionally formatted message ready to send.
284
+
{browserInfo.isIOS&&' If it doesn\'t open automatically, check your default email app settings.'}
285
+
{browserInfo.isAndroid&&' If it doesn\'t open automatically, you may need to select your preferred email app.'}
286
+
</>
287
+
) : (
288
+
<>
289
+
✅ Perfect! Your email client should now open with a professionally formatted message ready to send.
290
+
{browserInfo.isChrome&&' If it doesn\'t open automatically, check your browser\'s popup settings or use the fallback option below.'}
291
+
</>
292
+
)}
222
293
</div>
223
294
)}
224
295
@@ -231,9 +302,11 @@ This message was sent from your portfolio contact form at https://davidagustin.g
href={`mailto:davidsyagustin@gmail.com?subject=${encodeURIComponent(`Portfolio Contact from ${formData.name}`)}&body=${encodeURIComponent(emailContent)}`}
0 commit comments