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

fix(keyboard): Fix issue #1904 by [Removed delay for onKeyboardWillSh… #2230

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ZbignevS
Copy link

@ZbignevS ZbignevS commented Nov 2, 2024

Fix keyboard issue as per #1904

  • CSS transition matches native IOS keyboard one (got bezier function from IOS CAMediaTimingFunction);
  • Removed the delay;

Video:
https://github.com/user-attachments/assets/9b06b1ad-c267-422b-9666-c71db17f9b37

…oardWillShow && css transition matches native IOS keyboard one]
aeharding added a commit to aeharding/capacitor-plugins that referenced this pull request Nov 6, 2024
This fix aligns with the Android implementation of no delay.

This fix removes all keyboard delay, including the 0.01 second
delay for hiding. I believe this delay existed due to a slight
flicker observed when setting delay to 0.

However, by wrapping the height javascript logic in
`requestAnimationFrame()` the flicker is no longer present.

I believe this is a better solution than ionic-team#2230 because it
avoids adding animations (Ionic users can do this themselves
by disabling resizing and hooking into keyboardWillShow,
didShow, willHide, and didHide events in javascript.

It also avoids magic/arbitrary delay amounts, like 0.01.
aeharding added a commit to aeharding/capacitor-plugins that referenced this pull request Nov 6, 2024
This fix aligns with the Android implementation of no delay.

This fix removes all keyboard delay, including the 0.01 second
delay for hiding.

I believe this delay existed due to a slight
flicker observed when setting delay to 0. However, by
wrapping the height javascript logic in
`requestAnimationFrame()` the flicker is no longer present.

I believe this is a better solution than ionic-team#2230 because it
avoids adding animations. (Users can do this themselves
by disabling resizing and hooking into keyboardWillShow,
didShow, willHide, and didHide events in javascript.)

It also avoids magic/arbitrary delay amounts, like 0.01.
aeharding added a commit to aeharding/capacitor-plugins that referenced this pull request Nov 6, 2024
This fix aligns with the Android implementation of no delay.

This fix removes all keyboard delay, including the 0.01 second
delay for hiding. I believe this delay existed due to a slight
flicker observed when setting delay to 0. However, by
wrapping the height javascript logic in
`requestAnimationFrame()` the flicker is no longer present.

I believe this is a better solution than ionic-team#2230 because it
avoids adding animations. (Users can do this themselves
by disabling resizing and hooking into keyboardWillShow,
didShow, willHide, and didHide events in javascript.)

It also avoids magic/arbitrary delay amounts, like 0.01.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant