Skip to content

[1.30.4] Back is pressed instead of keyboard hidden if it's performed too quickly #1303

Open
@LukaszCuler

Description

@LukaszCuler

Describe the bug
Let's open a screen with EditText, which is focused automatically. Then, instantly hide the on-screen keyboard with hideKeyboard command. Usually, it works fine - we end up with focused EditText which we can feed with text and with complete visibility of the rest of the screen. However, sometimes hideKeyboard performs back before the keyboard is fully visible which navigates the app to the previous screen, so it's kind of a race condition.

Expected behavior
hideKeyboard should ensure that the on-screen keyboard is visible before trying to hide it to reduce flakiness.

Environment information (please complete the following information):

  • Maestro version: [1.30.4]
  • Platform: [Android 13]
  • Framework: [Native Android]
  • Device model and OS version: Android Emulator based on Android 13
  • Host: Mac M1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions