Skip to content

[0.71.0] [ANDROID 9] Keyboard events do not fire on Android 9 #35894

@bigcupcoffee

Description

@bigcupcoffee

Description

Brief

After upgrading an app to 0.71 everything depending on keyboard events didn't work. After short investigation issue has been narrowed down to Android 9, as my real device is android 9, another real device that works perfectly is Android 12.

Issue is reproducible on AVD with Android 9 Pie.

Downgrading to 0.70.6 fixes this.

What exactly happens

Noticed that if subscribed to the events in App.js, the show event fires once as soon as app starts up. Could be related I guess?

Version

0.71.0

Output of npx react-native info

Is not necessary

Steps to reproduce

  1. Tap input
  2. Keyboard pops up, events do not

Snack, code example, screenshot, or link to a repository

I simply used fresh new app with these insertions:

  useEffect(() => {
    const didShow = Keyboard.addListener('keyboardDidShow', event => {
      console.log('keyboard did show');
    });
    const didHide = Keyboard.addListener('keyboardDidHide', event => {
      console.log('keyboard did hide');
    });

    return () => {
      didShow.remove();
      didHide.remove();
    };
  }, []);
  // add to the bottom of ScrollView
  <TextInput placeholder="input is here" />

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions