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

Capacitor Keyboard height incorrect in Capacitor 6 #2168

Open
xanather opened this issue Aug 9, 2024 · 5 comments
Open

Capacitor Keyboard height incorrect in Capacitor 6 #2168

xanather opened this issue Aug 9, 2024 · 5 comments

Comments

@xanather
Copy link

xanather commented Aug 9, 2024

Bug Report

Plugin(s)

Capacitor Keyboard

Capacitor Version

6+

Affected Platform(s)

Android all versions, for older versions (Android 9) the bug is even more severe where no keyboard callbacks are made when windowSoftInputMode adjustPan mode is enabled.

Current Behavior

  1. The keyboard height includes the navigation bar height, which makes it kind of useless (its non-consistent and requires manually calculating navigation bar height to make it meaningful) and is a breaking change since it didn't before.
  2. There is no callback occuring on older versions of android with windowSoftInputMode adjustPan set.

Expected Behavior

  1. Keyboard height should only include the height inserted into the webview.
  2. Keyboard callbacks should occur always when windowSoftInputMode adjustPan is set.

Code Reproduction

Other Technical Details

Additional Context

See PR that broke functionality: #1980

@chriswep
Copy link

chriswep commented Aug 9, 2024

those are basically two different issues that were introduced by the same refactor (basically a rewrite) of the plugin.

i already created a issue including reproduction repo for "adjustPan on older Androids" here: #2158

The thing about the navigation bar is that it depends on wether you run your app in immersive mode or not. If yes, the webview also covers the navbar space. The plugin should detect that and add the navbar height correspondingly.

@xanather
Copy link
Author

xanather commented Aug 9, 2024

My bad @chriswep GitHub issue search sucks. I started digging into this issue hours ago which that would've popped up.

Technically going solely off just the titles this is a different issue though but related so I'll leave this up.

@Ionitron
Copy link
Collaborator

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 💙

@xanather
Copy link
Author

I'm not going to do that as I am short on time. I love the work that the OSS community has put into capacitor but all you need to do is read the merged PR for the complaints. There is enough information across the two issues and PR I linked.

@nichovski88
Copy link

I'm facing the same issue. On 6.0.2, the plugin returns the wrong keyboard. I suppose the navbar is calculated as well.

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

No branches or pull requests

5 participants