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

feat!(keyboard): Improvements to keyboard show / hide events #1980

Merged
merged 11 commits into from
Jan 23, 2024

Conversation

theproducer
Copy link
Contributor

No description provided.

@theproducer theproducer marked this pull request as ready for review January 4, 2024 15:58
Copy link
Member

@markemer markemer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always love removing direct frame math.

Copy link

github-actions bot commented Jan 17, 2024

Released dev build of keyboard with dev version: 6.0.0-dev-1980-20240123T163013.0

Copy link
Member

@jcesarmobile jcesarmobile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is removing the resizeOnFullScreen feature (https://capacitorjs.com/docs/apis/keyboard#configuration)
I don't think that's intended, the resizeOnFullScreen feature should continue to work.

@theproducer theproducer merged commit c4f9165 into main Jan 23, 2024
12 checks passed
@theproducer theproducer deleted the keyboard/show-hide-events branch January 23, 2024 16:45
@tafelnl
Copy link
Contributor

tafelnl commented Apr 16, 2024

What exactly is the breaking change here? I'm upgrading from Capacitor v5 to v6 and this change is not documented. So trying to figure out what potential impact this PR might have

@tobeagram
Copy link

I've just upgraded to Capacitor v6 and noticed that the recent PR not only refactors but also changes how the keyboard height is calculated to include the navigation gesture bar. The keyboard height can vary depending on whether a user uses three-button navigation or swipe gesture navigation. This added value makes it impossible to predict the keyboard's height within the bounds of our Capacitor web view.

For our use case, we need to either roll back these changes or amend them to exclude the navigation bar height. Is anyone else encountering this issue?

@seopei
Copy link

seopei commented Jul 19, 2024

@tobeagram I have the same issue too

@tobeagram
Copy link

For anyone wanting the original behaviour (@seopei) I've forked it here and published it here.

@chriswep
Copy link

chriswep commented Jul 26, 2024

This PR breaks keyboard listeners on Android <= 10 devices when android:windowSoftInputMode="adjustPan" is set. It just doesn't call the listener callbacks when the keyboard is shown. Changing the input mode to adjustResize makes the listeners work again, however we used adjustPan since it allowed us to get the keyboardHeight without the webivew being resized. Looking at the diff it seems that the implmentation was basically replaced completely. Something about the new implmentation made it stop working for the adjustPan mode on older Android sdks.

What is working:

  • Android 10 + downgrading to v5 of capacitor-keyboard
  • soft input mode adjustPan on newer Android devices (tested on Android 14)
  • soft input mode adjustResize

@xanather
Copy link

xanather commented Aug 9, 2024

Also have this issue, downgrading for now.

I will create an issue to track this.

@xanather
Copy link

xanather commented Aug 9, 2024

See #2168, might get more visibility there rather than commenting on this PR.

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

Successfully merging this pull request may close these issues.

10 participants