Skip to content

fix(PBRW-1027): keyboard stays open after saving alert if tap outside during filling the field #12539

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dariakoko
Copy link
Contributor

@dariakoko dariakoko commented Jul 25, 2025

This PR resolves PBRW-1027

Description

Dismiss keyboard before proceeding with request and navigation
I cannot reproduce the issue on my Android simulator, but this additional Keyboard.dismiss() should solve the issue

PR Checklist

  • I have tested my changes on the following platforms:
    • Android.
    • iOS.
  • I hid my changes behind a feature flag, or they don't need one.
  • I have included screenshots or videos at least on Android, or I have not changed the UI.
  • I have added tests, or my changes don't require any.
  • I added an app state migration, or my changes do not require one.
  • I have documented any follow-up work that this PR will require, or it does not require any.
  • I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

  • I would like at least one of the reviewers to run this PR on the simulator or device.
Changelog updates

Changelog updates

Cross-platform user-facing changes

  • Keyboard stays open after saving alert if tap outside during filling the field

iOS user-facing changes

Android user-facing changes

Dev changes

Need help with something? Have a look at our docs, or get in touch with us.

@dariakoko dariakoko self-assigned this Jul 25, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a React Native keyboard issue where the keyboard remains open after saving a search alert if the user taps outside the input field during form filling. The fix adds a keyboard dismiss call before processing the form submission.

  • Adds Keyboard.dismiss() to the form submission handler
  • Imports Keyboard from react-native

@@ -88,6 +88,8 @@ export const SavedSearchAlertForm: React.FC<SavedSearchAlertFormProps> = (props)
enableReinitialize: true,
initialErrors: {},
onSubmit: async (values) => {
Keyboard.dismiss()
Copy link
Preview

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.

@ArtsyOpenSource
Copy link
Contributor

This PR contains the following changes:

  • Cross-platform user-facing changes (Keyboard stays open after saving alert if tap outside during filling the field - dariakoko)

Generated by 🚫 dangerJS against 1a31402

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants