Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/app/Scenes/SavedSearchAlert/SavedSearchAlertForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { goBack, navigate, popToRoot } from "app/system/navigation/navigate"
import { refreshSavedAlerts } from "app/utils/refreshHelpers"
import { FormikProvider, useFormik } from "formik"
import { useEffect, useState } from "react"
import { Alert, StyleProp, ViewStyle } from "react-native"
import { Alert, Keyboard, StyleProp, ViewStyle } from "react-native"
import { useTracking } from "react-tracking"
import { useFirstMountState } from "react-use/lib/useFirstMountState"
import { Form } from "./Components/Form"
Expand Down Expand Up @@ -88,6 +88,8 @@ export const SavedSearchAlertForm: React.FC<SavedSearchAlertFormProps> = (props)
enableReinitialize: true,
initialErrors: {},
onSubmit: async (values) => {
Keyboard.dismiss()
Copy link

Copilot AI Jul 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider adding error handling or checking if the keyboard is actually open before dismissing it. While Keyboard.dismiss() is generally safe to call, it's better practice to be defensive, especially since you mentioned you couldn't reproduce the issue on Android simulator.

Suggested change
Keyboard.dismiss()
if (isKeyboardVisible) {
Keyboard.dismiss()
}

Copilot uses AI. Check for mistakes.

const userAlertSettings: SavedSearchAlertFormValues = {
name: values.name,
email: values.email,
Expand Down