capacitor icon indicating copy to clipboard operation
capacitor copied to clipboard

[Bug]: Don't use calculated bottom inset if keyboard is visible

Open insel-maz opened this issue 1 month ago • 3 comments

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

insel-maz avatar Dec 09 '25 15:12 insel-maz

[Bug]: SystemBars 为什么不能禁用??? 这和我项目中的键盘管理完全冲突 为什么不能禁用SystemBars ???

1600822305 avatar Dec 09 '25 22:12 1600822305

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 💙

ionitron-bot[bot] avatar Dec 10 '25 12:12 ionitron-bot[bot]

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!

eric-horodyski avatar Dec 10 '25 12:12 eric-horodyski

Hi!

Please see https://github.com/insel-maz/capacitor-8-safe-area-inset-bottom

insel-maz avatar Dec 11 '25 11:12 insel-maz

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.

ionitron-bot[bot] avatar Dec 11 '25 14:12 ionitron-bot[bot]