Skip to content
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

[BUG]: Toolbar not rendering above the keyboard on iOS #272

Open
dlayton66 opened this issue Feb 7, 2025 · 1 comment
Open

[BUG]: Toolbar not rendering above the keyboard on iOS #272

dlayton66 opened this issue Feb 7, 2025 · 1 comment

Comments

@dlayton66
Copy link

dlayton66 commented Feb 7, 2025

Hi there! We ran across this bug in our app recently and believe it may be an issue that's appeared with the package.

Describe the bug
The toolbar appears to be disreagarding KeyboardAvoidingView and rendering at the bottom of the screen with the keyboard on top of it so it is not visible. See screenshot.

To Reproduce
Expo: 52.0.31
React Native: 0.76.7
Simulator: iPhone 16 Pro
OS: iOS 18.2
Minimum reproducible example: https://github.com/dlayton66/ToolbarBug

Expected behavior
KeyboardAvoidingView causes the Toolbar component to be rendered directly above the keyboard.

Screenshots
When the recommended KeyboardAvoidingView style.bottom prop is changed from bottom: 0 to bottom: 400, the toolbar appears like this:

Image

@hesamzkr
Copy link

hesamzkr commented Feb 8, 2025

This is the solution I found. I don't use the built-in react-navigation header tho.

      <KeyboardAvoidingView
        behavior={Platform.OS === "ios" ? "padding" : "height"}
        style={styles.keyboardAvoidingView}
      >
        <View style={IsIos ? { position: "absolute", bottom: keyboardHeight, height: 40 } : {}}>
          <Toolbar
            editor={editor}
          />
        </View>
      </KeyboardAvoidingView>

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

No branches or pull requests

2 participants