Skip to content

WARNING: this package breaks keyboard events and can potentially lead to a hidden tabbar #70

Description

@pistonsky

When you have a style in your project like so:

const styles = StyleSheet.create({
  container: {
    height: ExtraDimensions.get('REAL_WINDOW_HEIGHT'),
  },
});

all keyboard events will be broken. When app starts, you will receive keyboardDidShow event right away, with some random relatively small value (for example, Samsung S20 has 81.52381134033203 value). However, no keyboard is shown, so this event should not even be dispatched. This can potentially break bottom tab bar if you set it to auto-hide on keyboard. Be aware!

Also, when you actually do focus some text input, the height of keyboard within the event will be wrong - it will be more than it actually is, by the value that comes when you hide the keyboard. And when you hide the keyboard, no keyboardDidHide event will be dispatched. Instead, you will receive keyboardDidShow.

This behavior occurs on some devices, not all of them. For example, I've seen it on Samsung S20 when navigation is setup to use 3-button navigation (soft navigation bar at the bottom).

How to reproduce

Start a new react native project, then install this package, and add code above. I've setup a repo for convenience

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions