react-native-keyboard-manager
react-native-keyboard-manager copied to clipboard
Toolbar hides once I start Typing (both on simulator and physical device)
- How did you link to the library (autolinking, manual, rn link, cocoapods)?
- Autolinking
- What version of React Native?
- 0.74.2
- What version of the library?
- 6.5.16-0
- iOS version?
- 17.5.1
- Did the problem happen after updating React Native?
- Yes (upgrading to expo 51)
- Are you using the library for the first time?
- No
- It's a bug? Provide a link to a minimal reproduction case.
https://github.com/douglasjunior/react-native-keyboard-manager/assets/16718548/de12b51a-b936-4975-bb83-651711ba27f8
You have upgraded from expo 50 to 51? On version 50 was working fine?
Please, provide the configuration used in the KeyboardManager.
Hi @douglasjunior Yes it was working fine on Version 50.
Her's the config I used
if (Platform.OS === 'ios') {
KeyboardManager.setEnable(true)
KeyboardManager.setEnableDebugging(true)
KeyboardManager.setKeyboardDistanceFromTextField(30)
KeyboardManager.setLayoutIfNeededOnUpdate(true)
KeyboardManager.setEnableAutoToolbar(true)
KeyboardManager.setToolbarDoneBarButtonItemText('Done')
KeyboardManager.setToolbarManageBehaviourBy('subviews') // "subviews" | "tag" | "position"
KeyboardManager.setToolbarPreviousNextButtonEnable(true)
KeyboardManager.setToolbarTintColor('#2C67F6') // Only #000000 format is supported
KeyboardManager.setToolbarBarTintColor('#f6f6f6') // Only #000000 format is supported
KeyboardManager.setShouldShowToolbarPlaceholder(false)
KeyboardManager.setOverrideKeyboardAppearance(false)
KeyboardManager.setKeyboardAppearance('default') // "default" | "light" | "dark"
KeyboardManager.setShouldResignOnTouchOutside(true)
KeyboardManager.setShouldPlayInputClicks(true)
}
I also tried using it without defining any config and it was the same.
Same issue is on happening on "expo": "^52.0.9" also!
It happens because of this: https://github.com/facebook/react-native/pull/48339
Expo 52 enables new architecture by default, and that issue is present on new architecture only. As a potential workaround you have two options:
- to patch RN with the changes from this PR
- to disable new architecture (temporarily) and enable it again in future Expo SDK versions (with RN 0.78 probably, I'll try to create a cherry pick request for RN 0.77)
Thank you @kirillzyusko, changes from your PR is fixed this issue! Here is the patch file if anyone would like to use! react-native+0.76.6.patch
@jayan2019 How to use this patch? I am using 0.76.7 version. Please help to fix this issue
@jayan2019 How to use this patch? I am using 0.76.7 version. Please help to fix this issue
Hi @sandeepsuthar you need to install patch-package in your project.
- Install patch-package
- Configure based on patch-package
- Change the code in node_modules as in this PR from @kirillzyusko
- Run
npx patch-package react-native
All are clearly explained in the patch-package Readme.md