[Bug]: Don't use calculated bottom inset if keyboard is visible
Capacitor Version
Capacitor 8.0.0
Other API Details
Platforms Affected
- [ ] iOS
- [x] Android
- [ ] Web
Current Behavior
In version 8.0.0 SystemBars sets too much bottom padding for --safe-area-inset-bottom if the keyboard is visible.
Expected Behavior
Don't use the calculated bottom safe area inset if the keyboard is visible.
No bottom inset is needed (e. g. by the navigation bar) if the keyboard is visible.
Project Reproduction
https://github.com/ionic-team/capacitor/blob/1ef73a306e10799cb568a6efd3e358eb6bf9c717/android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java#L167
Additional Information
To fix this you could possibly add
safeAreaInsets = Insets.of(safeAreaInsets.left, safeAreaInsets.top, safeAreaInsets.right, 0);
to
https://github.com/ionic-team/capacitor/blob/1ef73a306e10799cb568a6efd3e358eb6bf9c717/android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java#L167
[Bug]: SystemBars 为什么不能禁用??? 这和我项目中的键盘管理完全冲突 为什么不能禁用SystemBars ???
This issue needs more information before it can be addressed. In particular, the reporter needs to provide a minimal sample app that demonstrates the issue. If no sample app is provided within 15 days, the issue will be closed. Please see the Contributing Guide for how to create a Sample App. Thanks! Ionitron 💙
Hi @insel-maz,
Could you please attach a reproduction project that demonstrates the issue? Once we have that we can continue looking into this issue. Thanks!
Hi!
Please see https://github.com/insel-maz/capacitor-8-safe-area-inset-bottom
This issue has been labeled as type: bug. This label is added to issues that that have been reproduced and are being tracked in our internal issue tracker.