maestro icon indicating copy to clipboard operation
maestro copied to clipboard

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

Open LukaszCuler opened this issue 2 years ago • 3 comments

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

LukaszCuler avatar Jul 31 '23 12:07 LukaszCuler

Did you find any alternative solution? I am also facing this issue. :(

HR-Rabot avatar Mar 14 '25 15:03 HR-Rabot

This is still an issue right? Think I'm running into it.

arapocket avatar Dec 05 '25 08:12 arapocket

@arapocket Could be, it's not one I've looked into.

In the meantime, some workaround ideas:

  • add a waitForAnimationToEnd before hideKeyboard
  • tap something non-interactive instead of using hideKeyboard, like a header. That would dismiss the keyboard without risking unexpected navigation.

Fishbowler avatar Dec 05 '25 14:12 Fishbowler